OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ash/display/display_controller.h" | 5 #include "ash/display/display_controller.h" |
6 #include "ash/magnifier/magnification_controller.h" | 6 #include "ash/magnifier/magnification_controller.h" |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 } // namespace | 22 } // namespace |
23 | 23 |
24 class MagnificationControllerTest: public test::AshTestBase { | 24 class MagnificationControllerTest: public test::AshTestBase { |
25 public: | 25 public: |
26 MagnificationControllerTest() {} | 26 MagnificationControllerTest() {} |
27 virtual ~MagnificationControllerTest() {} | 27 virtual ~MagnificationControllerTest() {} |
28 | 28 |
29 virtual void SetUp() OVERRIDE { | 29 virtual void SetUp() OVERRIDE { |
30 AshTestBase::SetUp(); | 30 AshTestBase::SetUp(); |
31 UpdateDisplay(StringPrintf("%dx%d", kRootWidth, kRootHeight)); | 31 UpdateDisplay(base::StringPrintf("%dx%d", kRootWidth, kRootHeight)); |
32 | 32 |
33 aura::RootWindow* root = GetRootWindow(); | 33 aura::RootWindow* root = GetRootWindow(); |
34 gfx::Rect root_bounds(root->bounds()); | 34 gfx::Rect root_bounds(root->bounds()); |
35 | 35 |
36 #if defined(OS_WIN) | 36 #if defined(OS_WIN) |
37 // RootWindow and Display can't resize on Windows Ash. | 37 // RootWindow and Display can't resize on Windows Ash. |
38 // http://crbug.com/165962 | 38 // http://crbug.com/165962 |
39 EXPECT_EQ(kRootHeight, root_bounds.height()); | 39 EXPECT_EQ(kRootHeight, root_bounds.height()); |
40 EXPECT_EQ(kRootWidth, root_bounds.width()); | 40 EXPECT_EQ(kRootWidth, root_bounds.width()); |
41 #endif | 41 #endif |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 GetMagnificationController()->MoveWindow(200, 400, false); | 149 GetMagnificationController()->MoveWindow(200, 400, false); |
150 EXPECT_EQ("200,300 400x300", GetViewport().ToString()); | 150 EXPECT_EQ("200,300 400x300", GetViewport().ToString()); |
151 | 151 |
152 GetMagnificationController()->MoveWindow(1000, 1000, false); | 152 GetMagnificationController()->MoveWindow(1000, 1000, false); |
153 EXPECT_EQ("400,300 400x300", GetViewport().ToString()); | 153 EXPECT_EQ("400,300 400x300", GetViewport().ToString()); |
154 } | 154 } |
155 | 155 |
156 } // namespace internal | 156 } // namespace internal |
157 } // namespace ash | 157 } // namespace ash |
OLD | NEW |