| 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/window_sizer_common_unittest.h" | 5 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/common/wm/window_resizer.h" | 10 #include "ash/common/wm/window_resizer.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "ui/display/display.h" | 18 #include "ui/display/display.h" |
| 19 #include "ui/display/screen.h" | 19 #include "ui/display/screen.h" |
| 20 | 20 |
| 21 #if defined(USE_AURA) | 21 #if defined(USE_AURA) |
| 22 #include "ui/aura/window.h" | 22 #include "ui/aura/window.h" |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 // TODO(rjkroege): Use the common TestScreen. |
| 27 class TestScreen : public display::Screen { | 28 class TestScreen : public display::Screen { |
| 28 public: | 29 public: |
| 29 TestScreen() : previous_screen_(display::Screen::GetScreen()) { | 30 TestScreen() : previous_screen_(display::Screen::GetScreen()) { |
| 30 display::Screen::SetScreenInstance(this); | 31 display::Screen::SetScreenInstance(this); |
| 31 } | 32 } |
| 32 ~TestScreen() override { | 33 ~TestScreen() override { |
| 33 display::Screen::SetScreenInstance(previous_screen_); | 34 display::Screen::SetScreenInstance(previous_screen_); |
| 34 } | 35 } |
| 35 | 36 |
| 36 // Sets the index of the display returned from GetDisplayNearestWindow(). | 37 // Sets the index of the display returned from GetDisplayNearestWindow(). |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 { // Check that a window which hangs out of the screen get moved back in. | 466 { // Check that a window which hangs out of the screen get moved back in. |
| 466 gfx::Rect window_bounds; | 467 gfx::Rect window_bounds; |
| 467 GetWindowBounds(p1024x768, p1024x768, gfx::Rect(), gfx::Rect(), | 468 GetWindowBounds(p1024x768, p1024x768, gfx::Rect(), gfx::Rect(), |
| 468 gfx::Rect(), DEFAULT, NULL, | 469 gfx::Rect(), DEFAULT, NULL, |
| 469 gfx::Rect(1020, 700, 100, 100), &window_bounds); | 470 gfx::Rect(1020, 700, 100, 100), &window_bounds); |
| 470 EXPECT_EQ("924,668 100x100", window_bounds.ToString()); | 471 EXPECT_EQ("924,668 100x100", window_bounds.ToString()); |
| 471 } | 472 } |
| 472 } | 473 } |
| 473 | 474 |
| 474 #endif // defined(OS_MACOSX) | 475 #endif // defined(OS_MACOSX) |
| OLD | NEW |