Chromium Code Reviews

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

Issue 457103003: Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | 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 16 matching lines...)
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 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); 37 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL, true);
38 base::FilePath resources_pack_path; 38 base::FilePath resources_pack_path;
39 PathService::Get(base::DIR_MODULE, &resources_pack_path); 39 PathService::Get(base::DIR_MODULE, &resources_pack_path);
40 resources_pack_path = 40 resources_pack_path =
41 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); 41 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
42 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 42 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
43 resources_pack_path, ui::SCALE_FACTOR_NONE); 43 resources_pack_path, ui::SCALE_FACTOR_NONE);
44 44
45 test::AshTestBase::SetUp(); 45 test::AshTestBase::SetUp();
46 } 46 }
47 }; 47 };
(...skipping 54 matching lines...)
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.GetCurrentCursor().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.GetCurrentCursor().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