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

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: Rebase to ToT 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_close_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_browsertest.cc
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 13c514b43eee490077548f5ce90978370dc14cfc..5ce38f3d5fc0248649a6b0a64c313588f3d8a0a5 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));
}
@@ -1647,7 +1647,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) {
IN_PROC_BROWSER_TEST_F(BrowserTest, 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));
}
@@ -1712,8 +1712,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.
@@ -1746,7 +1746,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));
@@ -1779,7 +1779,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));
@@ -1795,7 +1795,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.
@@ -2860,7 +2860,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();
@@ -2877,7 +2878,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);
@@ -2894,7 +2896,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();
@@ -2909,7 +2912,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();
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_close_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698