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

Unified Diff: chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc

Issue 12285011: Reducing the maximize limit to a tine screen size - which will turn this off until we have the full (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reducing the maximize limit to a tine screen size - which will turn this off until we have the full… Created 7 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/window_sizer/window_sizer_ash.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc
diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc b/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc
index 68ca26e8aac4f072849a4e0ba94ebc5e597e155d..368399bb4b2624adae51e73d0edf408c3852821d 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc
@@ -743,19 +743,24 @@ TEST_F(WindowSizerTestWithBrowser, TestShowState) {
// In smaller screen resolutions we default to maximized if there is no other
// window visible.
- EXPECT_EQ(ui::SHOW_STATE_DEFAULT,
- GetWindowShowState(ui::SHOW_STATE_MAXIMIZED,
- ui::SHOW_STATE_DEFAULT,
- BOTH,
- browser2.get(),
- p1024x768));
- window->Hide();
- EXPECT_EQ(ui::SHOW_STATE_MAXIMIZED,
- GetWindowShowState(ui::SHOW_STATE_MAXIMIZED,
- ui::SHOW_STATE_DEFAULT,
- BOTH,
- browser2.get(),
- p1024x768));
+ int min_size = WindowSizer::GetForceMaximizedWidthLimit() / 2;
+ if (min_size > 0) {
+ const gfx::Rect tiny_screen(0, 0, min_size, min_size);
+ EXPECT_EQ(ui::SHOW_STATE_DEFAULT,
+ GetWindowShowState(ui::SHOW_STATE_MAXIMIZED,
+ ui::SHOW_STATE_DEFAULT,
+ BOTH,
+ browser2.get(),
+ tiny_screen));
+ window->Hide();
+ EXPECT_EQ(ui::SHOW_STATE_MAXIMIZED,
+ GetWindowShowState(ui::SHOW_STATE_MAXIMIZED,
+ ui::SHOW_STATE_DEFAULT,
+ BOTH,
+ browser2.get(),
+ tiny_screen));
+
+ }
}
// Test that the default show state override behavior is properly handled.
« no previous file with comments | « 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