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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view_interactive_uitest.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const bool kIsAsh = true; 67 const bool kIsAsh = true;
68 #else 68 #else
69 const bool kIsAsh = false; 69 const bool kIsAsh = false;
70 #endif // defined(USE_ASH) 70 #endif // defined(USE_ASH)
71 71
72 // Open a new browser window (app or tabbed depending on a parameter). 72 // Open a new browser window (app or tabbed depending on a parameter).
73 bool test_app = TestApp(); 73 bool test_app = TestApp();
74 Browser::CreateParams params = 74 Browser::CreateParams params =
75 test_app ? Browser::CreateParams::CreateForApp( 75 test_app ? Browser::CreateParams::CreateForApp(
76 "test_browser_app", true /* trusted_source */, gfx::Rect(), 76 "test_browser_app", true /* trusted_source */, gfx::Rect(),
77 browser()->profile()) 77 browser()->profile(), true)
78 : Browser::CreateParams(browser()->profile()); 78 : Browser::CreateParams(browser()->profile(), true);
79 params.initial_show_state = ui::SHOW_STATE_DEFAULT; 79 params.initial_show_state = ui::SHOW_STATE_DEFAULT;
80 80
81 // Default |browser()| is not used by this test. 81 // Default |browser()| is not used by this test.
82 browser()->window()->Close(); 82 browser()->window()->Close();
83 83
84 // Create a new app browser 84 // Create a new app browser
85 Browser* browser = new Browser(params); 85 Browser* browser = new Browser(params);
86 gfx::NativeWindow window = browser->window()->GetNativeWindow(); 86 gfx::NativeWindow window = browser->window()->GetNativeWindow();
87 gfx::Rect original_bounds(gfx::Rect(150, 250, 400, 100)); 87 gfx::Rect original_bounds(gfx::Rect(150, 250, 400, 100));
88 window->SetBounds(original_bounds); 88 window->SetBounds(original_bounds);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Newly created browser should retain undocked state. 123 // Newly created browser should retain undocked state.
124 window = browser->window()->GetNativeWindow(); 124 window = browser->window()->GetNativeWindow();
125 EXPECT_EQ(ui::SHOW_STATE_NORMAL, 125 EXPECT_EQ(ui::SHOW_STATE_NORMAL,
126 window->GetProperty(aura::client::kShowStateKey)); 126 window->GetProperty(aura::client::kShowStateKey));
127 } 127 }
128 128
129 INSTANTIATE_TEST_CASE_P(BrowserViewTestTabbedOrApp, 129 INSTANTIATE_TEST_CASE_P(BrowserViewTestTabbedOrApp,
130 BrowserViewTestParam, 130 BrowserViewTestParam,
131 testing::Bool()); 131 testing::Bool());
132 #endif 132 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view_focus_uitest.cc ('k') | chrome/browser/ui/views/frame/browser_window_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698