OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/cursor_window_controller.h" | 5 #include "ash/display/cursor_window_controller.h" |
6 | 6 |
7 #include "ash/display/display_util.h" | 7 #include "ash/display/display_util.h" |
8 #include "ash/display/window_tree_host_manager.h" | 8 #include "ash/display/window_tree_host_manager.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 UpdateDisplay("1000x500*2"); | 156 UpdateDisplay("1000x500*2"); |
157 int64_t primary_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); | 157 int64_t primary_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); |
158 | 158 |
159 test::ScopedSetInternalDisplayId set_internal(display_manager(), primary_id); | 159 test::ScopedSetInternalDisplayId set_internal(display_manager(), primary_id); |
160 SetCursorCompositionEnabled(true); | 160 SetCursorCompositionEnabled(true); |
161 ASSERT_EQ( | 161 ASSERT_EQ( |
162 2.0f, | 162 2.0f, |
163 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor()); | 163 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor()); |
164 EXPECT_TRUE(GetCursorImage().HasRepresentation(2.0f)); | 164 EXPECT_TRUE(GetCursorImage().HasRepresentation(2.0f)); |
165 | 165 |
166 ASSERT_TRUE(display_manager()->SetDisplayUIScale(primary_id, 2.0f)); | 166 ASSERT_TRUE(test::DisplayManagerTestApi(display_manager()) |
| 167 .SetDisplayUIScale(primary_id, 2.0f)); |
167 ASSERT_EQ( | 168 ASSERT_EQ( |
168 1.0f, | 169 1.0f, |
169 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor()); | 170 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor()); |
170 EXPECT_TRUE(GetCursorImage().HasRepresentation(2.0f)); | 171 EXPECT_TRUE(GetCursorImage().HasRepresentation(2.0f)); |
171 } | 172 } |
172 #endif | 173 #endif |
173 | 174 |
174 } // namespace ash | 175 } // namespace ash |
OLD | NEW |