Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: ash/display/cursor_window_controller_unittest.cc

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/display/cursor_window_controller.cc ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/screen_util.h" 9 #include "ash/screen_util.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Cursor was shown. 147 // Cursor was shown.
148 SetCursorCompositionEnabled(true); 148 SetCursorCompositionEnabled(true);
149 ASSERT_TRUE(GetCursorWindow()); 149 ASSERT_TRUE(GetCursorWindow());
150 EXPECT_TRUE(GetCursorWindow()->IsVisible()); 150 EXPECT_TRUE(GetCursorWindow()->IsVisible());
151 } 151 }
152 152
153 // Make sure that composition cursor stays big even when 153 // Make sure that composition cursor stays big even when
154 // the DSF becomes 1x as a result of zooming out. 154 // the DSF becomes 1x as a result of zooming out.
155 TEST_F(CursorWindowControllerTest, DSF) { 155 TEST_F(CursorWindowControllerTest, DSF) {
156 UpdateDisplay("1000x500*2"); 156 UpdateDisplay("1000x500*2");
157 int64_t primary_id = Shell::GetScreen()->GetPrimaryDisplay().id(); 157 int64_t primary_id = gfx::Screen::GetScreen()->GetPrimaryDisplay().id();
158 158
159 test::ScopedSetInternalDisplayId set_internal(primary_id); 159 test::ScopedSetInternalDisplayId set_internal(primary_id);
160 SetCursorCompositionEnabled(true); 160 SetCursorCompositionEnabled(true);
161 ASSERT_EQ(2.0f, 161 ASSERT_EQ(
162 Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor()); 162 2.0f,
163 gfx::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor());
163 EXPECT_TRUE(GetCursorImage().HasRepresentation(2.0f)); 164 EXPECT_TRUE(GetCursorImage().HasRepresentation(2.0f));
164 165
165 ASSERT_TRUE(SetDisplayUIScale(primary_id, 2.0f)); 166 ASSERT_TRUE(SetDisplayUIScale(primary_id, 2.0f));
166 ASSERT_EQ(1.0f, 167 ASSERT_EQ(
167 Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor()); 168 1.0f,
169 gfx::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor());
168 EXPECT_TRUE(GetCursorImage().HasRepresentation(2.0f)); 170 EXPECT_TRUE(GetCursorImage().HasRepresentation(2.0f));
169 } 171 }
170 #endif 172 #endif
171 173
172 } // namespace ash 174 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/cursor_window_controller.cc ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698