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

Side by Side Diff: chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc

Issue 2690563005: cros: Disable the auto management logic for v1app browser window (Closed)
Patch Set: nits 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view_interactive_uitest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/common/scoped_root_window_for_new_windows.h" 5 #include "ash/common/scoped_root_window_for_new_windows.h"
6 #include "ash/common/wm/window_positioner.h" 6 #include "ash/common/wm/window_positioner.h"
7 #include "ash/common/wm/window_resizer.h" 7 #include "ash/common/wm/window_resizer.h"
8 #include "ash/common/wm/window_state.h" 8 #include "ash/common/wm/window_state.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window.h" 10 #include "ash/common/wm_window.h"
(...skipping 24 matching lines...) Expand all
35 namespace { 35 namespace {
36 36
37 std::unique_ptr<Browser> CreateTestBrowser(aura::Window* window, 37 std::unique_ptr<Browser> CreateTestBrowser(aura::Window* window,
38 const gfx::Rect& bounds, 38 const gfx::Rect& bounds,
39 Browser::CreateParams* params) { 39 Browser::CreateParams* params) {
40 if (!bounds.IsEmpty()) 40 if (!bounds.IsEmpty())
41 window->SetBounds(bounds); 41 window->SetBounds(bounds);
42 std::unique_ptr<Browser> browser = 42 std::unique_ptr<Browser> browser =
43 chrome::CreateBrowserWithAuraTestWindowForParams(base::WrapUnique(window), 43 chrome::CreateBrowserWithAuraTestWindowForParams(base::WrapUnique(window),
44 params); 44 params);
45 if (browser->is_type_tabbed() || browser->is_app()) { 45 if (!browser->is_type_popup()) {
46 ash::wm::GetWindowState(browser->window()->GetNativeWindow()) 46 ash::wm::GetWindowState(browser->window()->GetNativeWindow())
47 ->set_window_position_managed(true); 47 ->set_window_position_managed(true);
48 } 48 }
49 return browser; 49 return browser;
50 } 50 }
51 51
52 } // namespace 52 } // namespace
53 53
54 // Test that the window is sized appropriately for the first run experience 54 // Test that the window is sized appropriately for the first run experience
55 // where the default window bounds calculation is invoked. 55 // where the default window bounds calculation is invoked.
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 EXPECT_EQ( 861 EXPECT_EQ(
862 ui::SHOW_STATE_DEFAULT, 862 ui::SHOW_STATE_DEFAULT,
863 GetWindowShowState(ui::SHOW_STATE_DEFAULT, ui::SHOW_STATE_NORMAL, BOTH, 863 GetWindowShowState(ui::SHOW_STATE_DEFAULT, ui::SHOW_STATE_NORMAL, BOTH,
864 trusted_popup.get(), p1280x1024, p1600x1200)); 864 trusted_popup.get(), p1280x1024, p1600x1200));
865 // A popup that is sized to occupy the whole work area has default state. 865 // A popup that is sized to occupy the whole work area has default state.
866 EXPECT_EQ( 866 EXPECT_EQ(
867 ui::SHOW_STATE_DEFAULT, 867 ui::SHOW_STATE_DEFAULT,
868 GetWindowShowState(ui::SHOW_STATE_DEFAULT, ui::SHOW_STATE_NORMAL, BOTH, 868 GetWindowShowState(ui::SHOW_STATE_DEFAULT, ui::SHOW_STATE_NORMAL, BOTH,
869 trusted_popup.get(), p1600x1200, p1600x1200)); 869 trusted_popup.get(), p1600x1200, p1600x1200));
870 } 870 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view_interactive_uitest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698