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

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

Issue 2721153004: Remove ash_util namespace (Closed)
Patch Set: Created 3 years, 9 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) 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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 // The window should start in default state. 811 // The window should start in default state.
812 EXPECT_EQ(ui::SHOW_STATE_DEFAULT, show_state); 812 EXPECT_EQ(ui::SHOW_STATE_DEFAULT, show_state);
813 EXPECT_EQ(specified_bounds.ToString(), bounds.ToString()); 813 EXPECT_EQ(specified_bounds.ToString(), bounds.ToString());
814 } 814 }
815 815
816 // Test that the target root window is used as the destination of 816 // Test that the target root window is used as the destination of
817 // the non browser window. This differ from PersistedBoundsCase 817 // the non browser window. This differ from PersistedBoundsCase
818 // in that this uses real ash shell implementations + StateProvider 818 // in that this uses real ash shell implementations + StateProvider
819 // TargetDisplayProvider, rather than mocks. 819 // TargetDisplayProvider, rather than mocks.
820 TEST_F(WindowSizerAshTest, DefaultBoundsInTargetDisplay) { 820 TEST_F(WindowSizerAshTest, DefaultBoundsInTargetDisplay) {
821 if (!ash_util::ShouldOpenAshOnStartup()) 821 if (!ShouldOpenAshOnStartup())
822 return; 822 return;
823 UpdateDisplay("500x500,600x600"); 823 UpdateDisplay("500x500,600x600");
824 824
825 // By default windows are placed on the primary display. 825 // By default windows are placed on the primary display.
826 ash::WmWindow* first_root = ash::WmShell::Get()->GetAllRootWindows()[0]; 826 ash::WmWindow* first_root = ash::WmShell::Get()->GetAllRootWindows()[0];
827 EXPECT_EQ(first_root, ash::WmShell::Get()->GetRootWindowForNewWindows()); 827 EXPECT_EQ(first_root, ash::WmShell::Get()->GetRootWindowForNewWindows());
828 gfx::Rect bounds; 828 gfx::Rect bounds;
829 ui::WindowShowState show_state; 829 ui::WindowShowState show_state;
830 WindowSizer::GetBrowserWindowBoundsAndShowState(std::string(), gfx::Rect(), 830 WindowSizer::GetBrowserWindowBoundsAndShowState(std::string(), gfx::Rect(),
831 NULL, &bounds, &show_state); 831 NULL, &bounds, &show_state);
(...skipping 29 matching lines...) Expand all
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
« chrome/browser/ui/ash/ash_util.cc ('K') | « chrome/browser/ui/window_sizer/window_sizer_ash.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698