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

Unified Diff: chrome/browser/extensions/api/management/management_apitest.cc

Issue 12315094: Remove kDefaultHostDesktopType from browser_finder.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix StartupBrowserCreatorTest.ProfilesWithoutPagesNotLaunched Created 7 years, 10 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
« no previous file with comments | « chrome/browser/chrome_main_browsertest.cc ('k') | chrome/browser/extensions/app_process_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/management/management_apitest.cc
diff --git a/chrome/browser/extensions/api/management/management_apitest.cc b/chrome/browser/extensions/api/management/management_apitest.cc
index dd43018d527e7603304c281802e544b66c3da2e9..cb440bf8fb87965dd0d1fe5555f8d9e738924039 100644
--- a/chrome/browser/extensions/api/management/management_apitest.cc
+++ b/chrome/browser/extensions/api/management/management_apitest.cc
@@ -176,7 +176,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, DISABLED_LaunchPanelApp) {
ASSERT_FALSE(HasFatalFailure()); // Stop the test if any ASSERT failed.
// Find the app's browser. Check that it is a popup.
- ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile()));
+ ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(),
+ browser()->host_desktop_type()));
Browser* app_browser = FindOtherBrowser(browser());
ASSERT_TRUE(app_browser->is_type_popup());
ASSERT_TRUE(app_browser->is_app());
@@ -191,7 +192,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, DISABLED_LaunchPanelApp) {
// Unload the extension.
UninstallExtension(app_id);
- ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile()));
+ ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(),
+ browser()->host_desktop_type()));
ASSERT_FALSE(service->GetExtensionById(app_id, true));
// Set a pref indicating that the user wants to launch in a regular tab.
@@ -209,7 +211,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, DISABLED_LaunchPanelApp) {
// Find the app's browser. Apps that should load in a panel ignore
// prefs, so we should still see the launch in a popup.
- ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile()));
+ ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(),
+ browser()->host_desktop_type()));
app_browser = FindOtherBrowser(browser());
ASSERT_TRUE(app_browser->is_type_popup());
ASSERT_TRUE(app_browser->is_app());
@@ -228,7 +231,8 @@ 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, chrome::GetBrowserCount(browser()->profile()));
+ ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(),
+ browser()->host_desktop_type()));
ASSERT_EQ(1, browser()->tab_strip_model()->count());
// Load an app with app.launch.container = "tab".
@@ -237,12 +241,14 @@ 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, chrome::GetBrowserCount(browser()->profile()));
+ ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(),
+ browser()->host_desktop_type()));
ASSERT_EQ(2, browser()->tab_strip_model()->count());
// Unload the extension.
UninstallExtension(app_id);
- ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile()));
+ ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(),
+ browser()->host_desktop_type()));
ASSERT_FALSE(service->GetExtensionById(app_id, true));
// Set a pref indicating that the user wants to launch in a window.
@@ -259,12 +265,14 @@ 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, chrome::GetBrowserCount(browser()->profile()));
+ ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(),
+ browser()->host_desktop_type()));
ASSERT_EQ(2, browser()->tab_strip_model()->count());
#else
// Find the app's browser. Opening in a new window will create
// a new browser.
- ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile()));
+ ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(),
+ browser()->host_desktop_type()));
Browser* app_browser = FindOtherBrowser(browser());
ASSERT_TRUE(app_browser->is_app());
ASSERT_FALSE(app_browser->is_type_panel());
« no previous file with comments | « chrome/browser/chrome_main_browsertest.cc ('k') | chrome/browser/extensions/app_process_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698