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

Side by Side Diff: chrome/browser/extensions/process_manager_browsertest.cc

Issue 508513002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Two more Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "extensions/browser/process_manager.h" 5 #include "extensions/browser/process_manager.h"
6 6
7 #include "chrome/browser/extensions/browser_action_test_util.h" 7 #include "chrome/browser/extensions/browser_action_test_util.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 IN_PROC_BROWSER_TEST_F(ProcessManagerBrowserTest, 69 IN_PROC_BROWSER_TEST_F(ProcessManagerBrowserTest,
70 DISABLED_PopupHostCreation) { 70 DISABLED_PopupHostCreation) {
71 ProcessManager* pm = ExtensionSystem::Get(profile())->process_manager(); 71 ProcessManager* pm = ExtensionSystem::Get(profile())->process_manager();
72 72
73 // Load an extension with the ability to open a popup but no background 73 // Load an extension with the ability to open a popup but no background
74 // page. 74 // page.
75 scoped_refptr<const Extension> popup = 75 scoped_refptr<const Extension> popup =
76 LoadExtension(test_data_dir_.AppendASCII("api_test") 76 LoadExtension(test_data_dir_.AppendASCII("api_test")
77 .AppendASCII("browser_action") 77 .AppendASCII("browser_action")
78 .AppendASCII("popup")); 78 .AppendASCII("popup"));
79 ASSERT_TRUE(popup); 79 ASSERT_TRUE(popup.get());
80 80
81 // No background host was added. 81 // No background host was added.
82 EXPECT_EQ(0u, pm->background_hosts().size()); 82 EXPECT_EQ(0u, pm->background_hosts().size());
83 EXPECT_EQ(0u, pm->GetAllViews().size()); 83 EXPECT_EQ(0u, pm->GetAllViews().size());
84 EXPECT_FALSE(pm->GetBackgroundHostForExtension(popup->id())); 84 EXPECT_FALSE(pm->GetBackgroundHostForExtension(popup->id()));
85 EXPECT_EQ(0u, pm->GetRenderViewHostsForExtension(popup->id()).size()); 85 EXPECT_EQ(0u, pm->GetRenderViewHostsForExtension(popup->id()).size());
86 EXPECT_TRUE(pm->GetSiteInstanceForURL(popup->url())); 86 EXPECT_TRUE(pm->GetSiteInstanceForURL(popup->url()));
87 EXPECT_FALSE(pm->IsBackgroundHostClosing(popup->id())); 87 EXPECT_FALSE(pm->IsBackgroundHostClosing(popup->id()));
88 EXPECT_EQ(0, pm->GetLazyKeepaliveCount(popup.get())); 88 EXPECT_EQ(0, pm->GetLazyKeepaliveCount(popup.get()));
89 89
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 content::WebContents::FromRenderViewHost( 153 content::WebContents::FromRenderViewHost(
154 *pm->GetRenderViewHostsForExtension(extension->id()).begin()); 154 *pm->GetRenderViewHostsForExtension(extension->id()).begin());
155 EXPECT_TRUE(extension_web_contents->GetSiteInstance() != 155 EXPECT_TRUE(extension_web_contents->GetSiteInstance() !=
156 tab_web_contents->GetSiteInstance()); 156 tab_web_contents->GetSiteInstance());
157 EXPECT_TRUE(pm->GetSiteInstanceForURL(extension->url()) != 157 EXPECT_TRUE(pm->GetSiteInstanceForURL(extension->url()) !=
158 tab_web_contents->GetSiteInstance()); 158 tab_web_contents->GetSiteInstance());
159 EXPECT_TRUE(pm->GetBackgroundHostForExtension(extension->id())); 159 EXPECT_TRUE(pm->GetBackgroundHostForExtension(extension->id()));
160 } 160 }
161 161
162 } // namespace extensions 162 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698