OLD | NEW |
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 12 matching lines...) Expand all Loading... |
23 #include "ui/gfx/x/x11_types.h" | 23 #include "ui/gfx/x/x11_types.h" |
24 #endif | 24 #endif |
25 | 25 |
26 namespace ash { | 26 namespace ash { |
27 | 27 |
28 class AshNativeCursorManagerTest : public test::AshTestBase { | 28 class AshNativeCursorManagerTest : public test::AshTestBase { |
29 public: | 29 public: |
30 AshNativeCursorManagerTest() {} | 30 AshNativeCursorManagerTest() {} |
31 virtual ~AshNativeCursorManagerTest() {} | 31 virtual ~AshNativeCursorManagerTest() {} |
32 | 32 |
33 virtual void SetUp() OVERRIDE { | 33 virtual void SetUp() override { |
34 gfx::GLSurface::InitializeOneOffForTests(); | 34 gfx::GLSurface::InitializeOneOffForTests(); |
35 | 35 |
36 ui::RegisterPathProvider(); | 36 ui::RegisterPathProvider(); |
37 ui::ResourceBundle::InitSharedInstanceWithLocale( | 37 ui::ResourceBundle::InitSharedInstanceWithLocale( |
38 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); | 38 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
39 base::FilePath resources_pack_path; | 39 base::FilePath resources_pack_path; |
40 PathService::Get(base::DIR_MODULE, &resources_pack_path); | 40 PathService::Get(base::DIR_MODULE, &resources_pack_path); |
41 resources_pack_path = | 41 resources_pack_path = |
42 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); | 42 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); |
43 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 43 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 display_manager->OnNativeDisplaysChanged(display_info_list); | 103 display_manager->OnNativeDisplaysChanged(display_info_list); |
104 | 104 |
105 MoveMouseSync(Shell::GetAllRootWindows()[0], 10, 10); | 105 MoveMouseSync(Shell::GetAllRootWindows()[0], 10, 10); |
106 EXPECT_EQ(1.0f, test_api.GetCurrentCursor().device_scale_factor()); | 106 EXPECT_EQ(1.0f, test_api.GetCurrentCursor().device_scale_factor()); |
107 | 107 |
108 MoveMouseSync(Shell::GetAllRootWindows()[0], 600, 10); | 108 MoveMouseSync(Shell::GetAllRootWindows()[0], 600, 10); |
109 EXPECT_EQ(2.0f, test_api.GetCurrentCursor().device_scale_factor()); | 109 EXPECT_EQ(2.0f, test_api.GetCurrentCursor().device_scale_factor()); |
110 } | 110 } |
111 | 111 |
112 } // namespace ash | 112 } // namespace ash |
OLD | NEW |