| OLD | NEW |
| 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.h" | 5 #include "chrome/browser/ui/window_sizer/window_sizer.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "chrome/browser/ui/window_sizer_common_unittest.h" | 11 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 // Test that the window is sized appropriately for the first run experience | 14 // Test that the window is sized appropriately for the first run experience |
| 15 // where the default window bounds calculation is invoked. | 15 // where the default window bounds calculation is invoked. |
| 16 TEST(WindowSizerTest, DefaultSizeCase) { | 16 TEST(WindowSizerTest, DefaultSizeCase) { |
| 17 { // 4:3 monitor case, 1024x768, no taskbar | 17 { // 4:3 monitor case, 1024x768, no taskbar |
| 18 gfx::Rect window_bounds; | 18 gfx::Rect window_bounds; |
| 19 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(), | 19 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(), |
| 20 gfx::Rect(), DEFAULT, &window_bounds, NULL, gfx::Rect()); | 20 gfx::Rect(), DEFAULT, &window_bounds, NULL, gfx::Rect()); |
| 21 EXPECT_EQ(gfx::Rect(kWindowTilePixels, kWindowTilePixels, | 21 EXPECT_EQ(gfx::Rect(kWindowTilePixels, kWindowTilePixels, |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 { // Check that a window which hangs out of the screen get moved back in. | 711 { // Check that a window which hangs out of the screen get moved back in. |
| 712 gfx::Rect window_bounds; | 712 gfx::Rect window_bounds; |
| 713 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(), | 713 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), gfx::Rect(), |
| 714 gfx::Rect(), DEFAULT, &window_bounds, NULL, | 714 gfx::Rect(), DEFAULT, &window_bounds, NULL, |
| 715 gfx::Rect(1020, 700, 100, 100)); | 715 gfx::Rect(1020, 700, 100, 100)); |
| 716 EXPECT_EQ(gfx::Rect(924, 668, 100, 100), window_bounds); | 716 EXPECT_EQ(gfx::Rect(924, 668, 100, 100), window_bounds); |
| 717 } | 717 } |
| 718 } | 718 } |
| 719 | 719 |
| 720 #endif //defined(OS_MACOSX) | 720 #endif //defined(OS_MACOSX) |
| OLD | NEW |