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

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame_ash_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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_frame_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_frame_ash.h"
6 6
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_window.h" 8 #include "chrome/browser/ui/browser_window.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 21 matching lines...) Expand all
32 IN_PROC_BROWSER_TEST_P(BrowserTestParam, 32 IN_PROC_BROWSER_TEST_P(BrowserTestParam,
33 TabbedOrAppBrowserWindowAutoManagementTest) { 33 TabbedOrAppBrowserWindowAutoManagementTest) {
34 // Default |browser()| is not used by this test. 34 // Default |browser()| is not used by this test.
35 browser()->window()->Close(); 35 browser()->window()->Close();
36 36
37 // Open a new browser window (app or tabbed depending on a parameter). 37 // Open a new browser window (app or tabbed depending on a parameter).
38 bool test_app = CreateV1App(); 38 bool test_app = CreateV1App();
39 Browser::CreateParams params = 39 Browser::CreateParams params =
40 test_app ? Browser::CreateParams::CreateForApp( 40 test_app ? Browser::CreateParams::CreateForApp(
41 "test_browser_app", true /* trusted_source */, gfx::Rect(), 41 "test_browser_app", true /* trusted_source */, gfx::Rect(),
42 browser()->profile()) 42 browser()->profile(), true)
43 : Browser::CreateParams(browser()->profile()); 43 : Browser::CreateParams(browser()->profile(), true);
44 params.initial_show_state = ui::SHOW_STATE_DEFAULT; 44 params.initial_show_state = ui::SHOW_STATE_DEFAULT;
45 Browser* browser = new Browser(params); 45 Browser* browser = new Browser(params);
46 gfx::NativeWindow window = browser->window()->GetNativeWindow(); 46 gfx::NativeWindow window = browser->window()->GetNativeWindow();
47 gfx::Rect original_bounds(gfx::Rect(150, 250, 400, 100)); 47 gfx::Rect original_bounds(gfx::Rect(150, 250, 400, 100));
48 window->SetBounds(original_bounds); 48 window->SetBounds(original_bounds);
49 window->Show(); 49 window->Show();
50 50
51 // For tabbed browser window, it will be centered to work area by auto window 51 // For tabbed browser window, it will be centered to work area by auto window
52 // mangement logic; for app browser window, it will remain the given bounds. 52 // mangement logic; for app browser window, it will remain the given bounds.
53 gfx::Rect work_area = display::Screen::GetScreen() 53 gfx::Rect work_area = display::Screen::GetScreen()
(...skipping 16 matching lines...) Expand all
70 window = browser->window()->GetNativeWindow(); 70 window = browser->window()->GetNativeWindow();
71 if (test_app) 71 if (test_app)
72 EXPECT_EQ(original_bounds, window->bounds()); 72 EXPECT_EQ(original_bounds, window->bounds());
73 else 73 else
74 EXPECT_EQ(tabbed_expected_bounds, window->bounds()); 74 EXPECT_EQ(tabbed_expected_bounds, window->bounds());
75 } 75 }
76 76
77 INSTANTIATE_TEST_CASE_P(BrowserTestTabbedOrApp, 77 INSTANTIATE_TEST_CASE_P(BrowserTestTabbedOrApp,
78 BrowserTestParam, 78 BrowserTestParam,
79 testing::Bool()); 79 testing::Bool());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698