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

Unified Diff: chrome/browser/ui/browser_browsertest.cc

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: We have both kinds of compile fixes: mac and windows Created 3 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
Index: chrome/browser/ui/browser_browsertest.cc
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index d35e8938bb307b618adace55fe91a652723aab53..ef65157753b687ae286be592ee5c2189ba3dbe74 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -1636,7 +1636,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OpenAppWindowLikeNtp) {
IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) {
Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP };
for (size_t i = 0; i < arraysize(types); ++i) {
- Browser::CreateParams params(types[i], browser()->profile());
+ Browser::CreateParams params(types[i], browser()->profile(), true);
params.initial_show_state = ui::SHOW_STATE_MAXIMIZED;
AddBlankTabAndShow(new Browser(params));
}
@@ -1653,7 +1653,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) {
IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_StartMinimized) {
Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP };
for (size_t i = 0; i < arraysize(types); ++i) {
- Browser::CreateParams params(types[i], browser()->profile());
+ Browser::CreateParams params(types[i], browser()->profile(), true);
params.initial_show_state = ui::SHOW_STATE_MINIMIZED;
AddBlankTabAndShow(new Browser(params));
}
@@ -1718,8 +1718,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, DisableMenuItemsWhenIncognitoIsForced) {
EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_NEW_INCOGNITO_WINDOW));
// Create a new browser.
- Browser* new_browser = new Browser(
- Browser::CreateParams(browser()->profile()->GetOffTheRecordProfile()));
+ Browser* new_browser = new Browser(Browser::CreateParams(
+ browser()->profile()->GetOffTheRecordProfile(), true));
CommandUpdater* new_command_updater =
new_browser->command_controller()->command_updater();
// It should have Bookmarks & Settings commands disabled by default.
@@ -1752,7 +1752,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest,
// Create a new browser.
Browser* new_browser =
- new Browser(Browser::CreateParams(browser()->profile()));
+ new Browser(Browser::CreateParams(browser()->profile(), true));
CommandUpdater* new_command_updater =
new_browser->command_controller()->command_updater();
EXPECT_FALSE(new_command_updater->IsCommandEnabled(IDC_NEW_INCOGNITO_WINDOW));
@@ -1785,7 +1785,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest,
// Create a popup (non-main-UI-type) browser. Settings command as well
// as Extensions should be disabled.
Browser* popup_browser = new Browser(
- Browser::CreateParams(Browser::TYPE_POPUP, browser()->profile()));
+ Browser::CreateParams(Browser::TYPE_POPUP, browser()->profile(), true));
CommandUpdater* popup_command_updater =
popup_browser->command_controller()->command_updater();
EXPECT_FALSE(popup_command_updater->IsCommandEnabled(IDC_MANAGE_EXTENSIONS));
@@ -1801,7 +1801,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest,
DisableOptionsAndImportMenuItemsConsistently) {
// Create a popup browser.
Browser* popup_browser = new Browser(
- Browser::CreateParams(Browser::TYPE_POPUP, browser()->profile()));
+ Browser::CreateParams(Browser::TYPE_POPUP, browser()->profile(), true));
CommandUpdater* command_updater =
popup_browser->command_controller()->command_updater();
// OPTIONS and IMPORT_SETTINGS are disabled for a non-normal UI.
@@ -2866,7 +2866,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) {
// Creates an untrusted popup window and asserts that the eventual height is
// padded with the toolbar and title bar height (initial height is content
// height).
- Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile());
+ Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile(),
+ true);
params.initial_bounds = gfx::Rect(0, 0, 100, 122);
Browser* browser = new Browser(params);
gfx::Rect bounds = browser->window()->GetBounds();
@@ -2883,7 +2884,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) {
{
// Creates a trusted popup window and asserts that the eventual height
// doesn't change (initial height is window height).
- Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile());
+ Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile(),
+ true);
params.initial_bounds = gfx::Rect(0, 0, 100, 122);
params.trusted_source = true;
Browser* browser = new Browser(params);
@@ -2900,7 +2902,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) {
// Creates an untrusted app window and asserts that the eventual height
// doesn't change.
Browser::CreateParams params = Browser::CreateParams::CreateForApp(
- "app-name", false, gfx::Rect(0, 0, 100, 122), browser()->profile());
+ "app-name", false, gfx::Rect(0, 0, 100, 122), browser()->profile(),
+ true);
Browser* browser = new Browser(params);
gfx::Rect bounds = browser->window()->GetBounds();
@@ -2915,7 +2918,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) {
// Creates a trusted app window and asserts that the eventual height
// doesn't change.
Browser::CreateParams params = Browser::CreateParams::CreateForApp(
- "app-name", true, gfx::Rect(0, 0, 100, 122), browser()->profile());
+ "app-name", true, gfx::Rect(0, 0, 100, 122), browser()->profile(),
+ true);
Browser* browser = new Browser(params);
gfx::Rect bounds = browser->window()->GetBounds();

Powered by Google App Engine
This is Rietveld 408576698