| Index: content/browser/browser_plugin/browser_plugin_host_browsertest.cc
|
| diff --git a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
|
| index b4059505b67f2ce962513282fba53b1e6d65e522..6aeab3e0f2eb05a231f2be080b5e6d69020fb187 100644
|
| --- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
|
| +++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
|
| @@ -102,11 +102,11 @@ class TestBrowserPluginEmbedder : public BrowserPluginEmbedder {
|
| class TestBrowserPluginHostFactory : public BrowserPluginHostFactory {
|
| public:
|
| virtual BrowserPluginGuestManager*
|
| - CreateBrowserPluginGuestManager() OVERRIDE {
|
| + CreateBrowserPluginGuestManager(BrowserContext* context) OVERRIDE {
|
| guest_manager_instance_count_++;
|
| if (message_loop_runner_)
|
| message_loop_runner_->Quit();
|
| - return new TestBrowserPluginGuestManager();
|
| + return new TestBrowserPluginGuestManager(context);
|
| }
|
|
|
| virtual BrowserPluginGuest* CreateBrowserPluginGuest(
|
| @@ -315,18 +315,13 @@ class BrowserPluginHostTest : public ContentBrowserTest {
|
| ASSERT_TRUE(test_embedder_);
|
|
|
| test_guest_manager_ = static_cast<TestBrowserPluginGuestManager*>(
|
| - embedder_web_contents->GetBrowserPluginGuestManager());
|
| + BrowserPluginGuestManager::FromBrowserContext(
|
| + test_embedder_->GetWebContents()->GetBrowserContext()));
|
| ASSERT_TRUE(test_guest_manager_);
|
|
|
| - test_guest_manager_->WaitForGuestAdded();
|
| -
|
| - // Verify that we have exactly one guest.
|
| - const TestBrowserPluginGuestManager::GuestInstanceMap& instance_map =
|
| - test_guest_manager_->guest_web_contents_for_testing();
|
| - EXPECT_EQ(1u, instance_map.size());
|
| -
|
| WebContentsImpl* test_guest_web_contents = static_cast<WebContentsImpl*>(
|
| - instance_map.begin()->second);
|
| + test_guest_manager_->WaitForGuestAdded());
|
| +
|
| test_guest_ = static_cast<TestBrowserPluginGuest*>(
|
| test_guest_web_contents->GetBrowserPluginGuest());
|
| test_guest_->WaitForLoadStop();
|
| @@ -541,12 +536,9 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, DISABLED_ReloadEmbedder) {
|
| ExecuteSyncJSFunction(
|
| test_embedder()->web_contents()->GetMainFrame(),
|
| base::StringPrintf("SetSrc('%s');", kHTMLForGuest));
|
| - test_guest_manager()->WaitForGuestAdded();
|
|
|
| - const TestBrowserPluginGuestManager::GuestInstanceMap& instance_map =
|
| - test_guest_manager()->guest_web_contents_for_testing();
|
| WebContentsImpl* test_guest_web_contents = static_cast<WebContentsImpl*>(
|
| - instance_map.begin()->second);
|
| + test_guest_manager()->WaitForGuestAdded());
|
| TestBrowserPluginGuest* new_test_guest =
|
| static_cast<TestBrowserPluginGuest*>(
|
| test_guest_web_contents->GetBrowserPluginGuest());
|
|
|