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

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

Issue 11072002: Combined window positioning and show state determiniation in the WindowSizer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed more build issues Created 8 years, 2 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 | Annotate | Revision Log
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 "chrome/browser/ui/window_sizer/window_sizer.h" 5 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h"
6
7 #include <vector>
8 6
9 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
10 #include "base/logging.h" 8 #include "chrome/common/chrome_switches.h"
11 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h"
12 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
13 10
14 // Test that the window is sized appropriately for the first run experience 11 // Test that the window is sized appropriately for the first run experience
15 // where the default window bounds calculation is invoked. 12 // where the default window bounds calculation is invoked.
16 TEST(WindowSizerTest, DefaultSizeCase) { 13 TEST(WindowSizerTest, DefaultSizeCase) {
17 { // 4:3 monitor case, 1024x768, no taskbar 14 { // 4:3 monitor case, 1024x768, no taskbar
18 gfx::Rect window_bounds; 15 gfx::Rect window_bounds;
19 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(), 16 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(),
20 gfx::Rect(), DEFAULT, &window_bounds, NULL, gfx::Rect()); 17 gfx::Rect(), DEFAULT, &window_bounds, NULL, gfx::Rect());
21 EXPECT_EQ(gfx::Rect(kWindowTilePixels, kWindowTilePixels, 18 EXPECT_EQ(gfx::Rect(kWindowTilePixels, kWindowTilePixels,
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 { // Check that a window which hangs out of the screen get moved back in. 708 { // Check that a window which hangs out of the screen get moved back in.
712 gfx::Rect window_bounds; 709 gfx::Rect window_bounds;
713 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(), 710 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(),
714 gfx::Rect(), DEFAULT, &window_bounds, NULL, 711 gfx::Rect(), DEFAULT, &window_bounds, NULL,
715 gfx::Rect(1020, 700, 100, 100)); 712 gfx::Rect(1020, 700, 100, 100));
716 EXPECT_EQ(gfx::Rect(924, 668, 100, 100), window_bounds); 713 EXPECT_EQ(gfx::Rect(924, 668, 100, 100), window_bounds);
717 } 714 }
718 } 715 }
719 716
720 #endif //defined(OS_MACOSX) 717 #endif //defined(OS_MACOSX)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698