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

Side by Side Diff: ash/wm/ash_native_cursor_manager_interactive_uitest.cc

Issue 226293005: Use platform's device scale factor for cursor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "ash/wm/ash_native_cursor_manager.h" 4 #include "ash/wm/ash_native_cursor_manager.h"
5 5
6 #include "ash/display/display_info.h" 6 #include "ash/display/display_info.h"
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "ash/test/cursor_manager_test_api.h" 10 #include "ash/test/cursor_manager_test_api.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 DisplayInfo display_info1 = 95 DisplayInfo display_info1 =
96 CreateDisplayInfo(10, gfx::Rect(0, 0, 500, 300), 1.0f); 96 CreateDisplayInfo(10, gfx::Rect(0, 0, 500, 300), 1.0f);
97 DisplayInfo display_info2 = 97 DisplayInfo display_info2 =
98 CreateDisplayInfo(20, gfx::Rect(500, 0, 500, 300), 2.0f); 98 CreateDisplayInfo(20, gfx::Rect(500, 0, 500, 300), 2.0f);
99 std::vector<DisplayInfo> display_info_list; 99 std::vector<DisplayInfo> display_info_list;
100 display_info_list.push_back(display_info1); 100 display_info_list.push_back(display_info1);
101 display_info_list.push_back(display_info2); 101 display_info_list.push_back(display_info2);
102 display_manager->OnNativeDisplaysChanged(display_info_list); 102 display_manager->OnNativeDisplaysChanged(display_info_list);
103 103
104 MoveMouseSync(Shell::GetAllRootWindows()[0], 10, 10); 104 MoveMouseSync(Shell::GetAllRootWindows()[0], 10, 10);
105 EXPECT_EQ(1.0f, test_api.GetDisplay().device_scale_factor()); 105 EXPECT_EQ(1.0f, test_api.GetCurrentCursor().device_scale_factor());
106 106
107 MoveMouseSync(Shell::GetAllRootWindows()[0], 600, 10); 107 MoveMouseSync(Shell::GetAllRootWindows()[0], 600, 10);
108 EXPECT_EQ(2.0f, test_api.GetDisplay().device_scale_factor()); 108 EXPECT_EQ(2.0f, test_api.GetCurrentCursor().device_scale_factor());
109 } 109 }
110 110
111 } // namespace ash 111 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698