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

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: Addressed comments 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"
11 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h"
12 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
13 9
14 // Test that the window is sized appropriately for the first run experience 10 // Test that the window is sized appropriately for the first run experience
15 // where the default window bounds calculation is invoked. 11 // where the default window bounds calculation is invoked.
16 TEST(WindowSizerTest, DefaultSizeCase) { 12 TEST(WindowSizerTest, DefaultSizeCase) {
17 { // 4:3 monitor case, 1024x768, no taskbar 13 { // 4:3 monitor case, 1024x768, no taskbar
18 gfx::Rect window_bounds; 14 gfx::Rect window_bounds;
19 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(), 15 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(),
20 gfx::Rect(), DEFAULT, &window_bounds, NULL, gfx::Rect()); 16 gfx::Rect(), DEFAULT, &window_bounds, NULL, gfx::Rect());
21 EXPECT_EQ(gfx::Rect(kWindowTilePixels, kWindowTilePixels, 17 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. 707 { // Check that a window which hangs out of the screen get moved back in.
712 gfx::Rect window_bounds; 708 gfx::Rect window_bounds;
713 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(), 709 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(),
714 gfx::Rect(), DEFAULT, &window_bounds, NULL, 710 gfx::Rect(), DEFAULT, &window_bounds, NULL,
715 gfx::Rect(1020, 700, 100, 100)); 711 gfx::Rect(1020, 700, 100, 100));
716 EXPECT_EQ(gfx::Rect(924, 668, 100, 100), window_bounds); 712 EXPECT_EQ(gfx::Rect(924, 668, 100, 100), window_bounds);
717 } 713 }
718 } 714 }
719 715
720 #endif //defined(OS_MACOSX) 716 #endif //defined(OS_MACOSX)
OLDNEW
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698