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

Unified Diff: chrome/browser/extensions/extension_management_apitest.cc

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
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());

Powered by Google App Engine
This is Rietveld 408576698