OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "ash/magnifier/magnification_controller.h" | 7 #include "ash/magnifier/magnification_controller.h" |
8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 DISALLOW_COPY_AND_ASSIGN(MagnifierAnimationWaiter); | 89 DISALLOW_COPY_AND_ASSIGN(MagnifierAnimationWaiter); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace | 92 } // namespace |
93 | 93 |
94 class MagnificationControllerTest : public InProcessBrowserTest { | 94 class MagnificationControllerTest : public InProcessBrowserTest { |
95 protected: | 95 protected: |
96 MagnificationControllerTest() {} | 96 MagnificationControllerTest() {} |
97 ~MagnificationControllerTest() override {} | 97 ~MagnificationControllerTest() override {} |
98 | 98 |
99 void SetUpCommandLine(CommandLine* command_line) override { | 99 void SetUpCommandLine(base::CommandLine* command_line) override { |
100 InProcessBrowserTest::SetUpCommandLine(command_line); | 100 InProcessBrowserTest::SetUpCommandLine(command_line); |
101 // Make screens sufficiently wide to host 2 browsers side by side. | 101 // Make screens sufficiently wide to host 2 browsers side by side. |
102 command_line->AppendSwitchASCII("ash-host-window-bounds", "1200x800"); | 102 command_line->AppendSwitchASCII("ash-host-window-bounds", "1200x800"); |
103 } | 103 } |
104 | 104 |
105 void SetUpOnMainThread() override { | 105 void SetUpOnMainThread() override { |
106 SetMagnifierEnabled(true); | 106 SetMagnifierEnabled(true); |
107 | 107 |
108 // Confirms that magnifier is enabled. | 108 // Confirms that magnifier is enabled. |
109 EXPECT_TRUE(IsMagnifierEnabled()); | 109 EXPECT_TRUE(IsMagnifierEnabled()); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 // Set the focus on the button. | 220 // Set the focus on the button. |
221 SetFocusOnElement("test_button"); | 221 SetFocusOnElement("test_button"); |
222 | 222 |
223 // Verify the magnifier window is not moved and still contains the button. | 223 // Verify the magnifier window is not moved and still contains the button. |
224 const gfx::Rect view_port_after_focus = GetViewPort(); | 224 const gfx::Rect view_port_after_focus = GetViewPort(); |
225 EXPECT_TRUE(view_port_after_focus.Contains(button_bounds)); | 225 EXPECT_TRUE(view_port_after_focus.Contains(button_bounds)); |
226 EXPECT_EQ(view_port_before_focus, view_port_after_focus); | 226 EXPECT_EQ(view_port_before_focus, view_port_after_focus); |
227 } | 227 } |
228 | 228 |
229 } // namespace chromeos | 229 } // namespace chromeos |
OLD | NEW |