Index: chrome/browser/extensions/extension_management_apitest.cc |
diff --git a/chrome/browser/extensions/extension_management_apitest.cc b/chrome/browser/extensions/extension_management_apitest.cc |
index 1bcda9ef78d592a9beb4e4911c3f3c0956773d3f..e1d0d8a29ea71d83f1cc848951c32bc23281380e 100644 |
--- a/chrome/browser/extensions/extension_management_apitest.cc |
+++ b/chrome/browser/extensions/extension_management_apitest.cc |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -7,6 +7,7 @@ |
#include "chrome/browser/extensions/extension_test_message_listener.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/browser.h" |
+#include "chrome/browser/ui/browser_finder.h" |
#include "chrome/browser/ui/browser_list.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/chrome_switches.h" |
@@ -92,7 +93,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchPanelApp) { |
ASSERT_FALSE(HasFatalFailure()); // Stop the test if any ASSERT failed. |
// Find the app's browser. Check that it is a panel. |
- ASSERT_EQ(2u, BrowserList::GetBrowserCount(browser()->profile())); |
+ ASSERT_EQ(2u, browser::GetBrowserCount(browser()->profile())); |
Browser* app_browser = FindOtherBrowser(browser()); |
ASSERT_TRUE(app_browser->is_type_panel()); |
ASSERT_TRUE(app_browser->is_app()); |
@@ -107,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchPanelApp) { |
// Unload the extension. |
UninstallExtension(app_id); |
- ASSERT_EQ(1u, BrowserList::GetBrowserCount(browser()->profile())); |
+ ASSERT_EQ(1u, browser::GetBrowserCount(browser()->profile())); |
ASSERT_FALSE(service->GetExtensionById(app_id, true)); |
// Set a pref indicating that the user wants to launch in a regular tab. |
@@ -125,7 +126,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchPanelApp) { |
// Find the app's browser. Apps that should load in a panel ignore |
// prefs, so we should still see the launch in a panel. |
- ASSERT_EQ(2u, BrowserList::GetBrowserCount(browser()->profile())); |
+ ASSERT_EQ(2u, browser::GetBrowserCount(browser()->profile())); |
app_browser = FindOtherBrowser(browser()); |
ASSERT_TRUE(app_browser->is_type_panel()); |
ASSERT_TRUE(app_browser->is_app()); |
@@ -143,7 +144,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchTabApp) { |
// Code below assumes that the test starts with a single browser window |
// hosting one tab. |
- ASSERT_EQ(1u, BrowserList::GetBrowserCount(browser()->profile())); |
+ ASSERT_EQ(1u, browser::GetBrowserCount(browser()->profile())); |
ASSERT_EQ(1, browser()->tab_count()); |
// Load an app with app.launch.container = "tab". |
@@ -152,12 +153,12 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchTabApp) { |
ASSERT_FALSE(HasFatalFailure()); |
// Check that the app opened in a new tab of the existing browser. |
- ASSERT_EQ(1u, BrowserList::GetBrowserCount(browser()->profile())); |
+ ASSERT_EQ(1u, browser::GetBrowserCount(browser()->profile())); |
ASSERT_EQ(2, browser()->tab_count()); |
// Unload the extension. |
UninstallExtension(app_id); |
- ASSERT_EQ(1u, BrowserList::GetBrowserCount(browser()->profile())); |
+ ASSERT_EQ(1u, browser::GetBrowserCount(browser()->profile())); |
ASSERT_FALSE(service->GetExtensionById(app_id, true)); |
// Set a pref indicating that the user wants to launch in a window. |
@@ -174,12 +175,12 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchTabApp) { |
#if defined(OS_MACOSX) |
// App windows are not yet implemented on mac os. We should fall back |
// to a normal tab. |
- ASSERT_EQ(1u, BrowserList::GetBrowserCount(browser()->profile())); |
+ ASSERT_EQ(1u, browser::GetBrowserCount(browser()->profile())); |
ASSERT_EQ(2, browser()->tab_count()); |
#else |
// Find the app's browser. Opening in a new window will create |
// a new browser. |
- ASSERT_EQ(2u, BrowserList::GetBrowserCount(browser()->profile())); |
+ ASSERT_EQ(2u, browser::GetBrowserCount(browser()->profile())); |
Browser* app_browser = FindOtherBrowser(browser()); |
ASSERT_TRUE(app_browser->is_app()); |
ASSERT_FALSE(app_browser->is_type_panel()); |