OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/singleton.h" | 6 #include "base/memory/singleton.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/strings/string_split.h" | 8 #include "base/strings/string_split.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 GetBrowserPluginEmbedder()); | 456 GetBrowserPluginEmbedder()); |
457 // Verify we have a no embedder in web_contents (since the new page doesn't | 457 // Verify we have a no embedder in web_contents (since the new page doesn't |
458 // have any browser plugin). | 458 // have any browser plugin). |
459 ASSERT_TRUE(!test_embedder_after_swap); | 459 ASSERT_TRUE(!test_embedder_after_swap); |
460 ASSERT_NE(test_embedder(), test_embedder_after_swap); | 460 ASSERT_NE(test_embedder(), test_embedder_after_swap); |
461 } | 461 } |
462 | 462 |
463 // This test opens two pages in http and there is no RenderViewHost swap, | 463 // This test opens two pages in http and there is no RenderViewHost swap, |
464 // therefore the embedder created on first page navigation stays the same in | 464 // therefore the embedder created on first page navigation stays the same in |
465 // web_contents. | 465 // web_contents. |
466 #if defined(OS_CHROMEOS) | 466 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, EmbedderSameAfterNav) { |
467 // crbug.com/283625 | |
468 #define MAYBE_EmbedderSameAfterNav DISABLED_EmbedderSameAfterNav | |
469 #else | |
470 #define MAYBE_EmbedderSameAfterNav EmbedderSameAfterNav | |
471 #endif | |
472 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, MAYBE_EmbedderSameAfterNav) { | |
473 const char kEmbedderURL[] = "/browser_plugin_embedder.html"; | 467 const char kEmbedderURL[] = "/browser_plugin_embedder.html"; |
474 StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string()); | 468 StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string()); |
475 WebContentsImpl* embedder_web_contents = test_embedder()->web_contents(); | 469 WebContentsImpl* embedder_web_contents = test_embedder()->web_contents(); |
476 | 470 |
477 // Navigate to another page in same host and port, so RenderViewHost swap | 471 // Navigate to another page in same host and port, so RenderViewHost swap |
478 // does not happen and existing embedder doesn't change in web_contents. | 472 // does not happen and existing embedder doesn't change in web_contents. |
479 GURL test_url_new(embedded_test_server()->GetURL( | 473 GURL test_url_new(embedded_test_server()->GetURL( |
480 "/browser_plugin_title_change.html")); | 474 "/browser_plugin_title_change.html")); |
481 const string16 expected_title = ASCIIToUTF16("done"); | 475 const string16 expected_title = ASCIIToUTF16("done"); |
482 content::TitleWatcher title_watcher(shell()->web_contents(), expected_title); | 476 content::TitleWatcher title_watcher(shell()->web_contents(), expected_title); |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 // should be blocked because the scheme isn't web-safe or a pseudo-scheme. | 840 // should be blocked because the scheme isn't web-safe or a pseudo-scheme. |
847 ExecuteSyncJSFunction( | 841 ExecuteSyncJSFunction( |
848 test_embedder()->web_contents()->GetRenderViewHost(), | 842 test_embedder()->web_contents()->GetRenderViewHost(), |
849 base::StringPrintf("SetSrc('%s://abc123');", | 843 base::StringPrintf("SetSrc('%s://abc123');", |
850 chrome::kGuestScheme)); | 844 chrome::kGuestScheme)); |
851 EXPECT_TRUE(delegate->load_aborted()); | 845 EXPECT_TRUE(delegate->load_aborted()); |
852 EXPECT_TRUE(delegate->load_aborted_url().is_valid()); | 846 EXPECT_TRUE(delegate->load_aborted_url().is_valid()); |
853 } | 847 } |
854 | 848 |
855 } // namespace content | 849 } // namespace content |
OLD | NEW |