Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1754)

Side by Side Diff: content/browser/browser_plugin/browser_plugin_host_browsertest.cc

Issue 23454014: cc: Drop ContextProvider references on the impl thread before quitting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: callbackcontrolcenter: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698