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

Side by Side Diff: ui/ozone/platform/test/ozone_platform_test.cc

Issue 742103002: Ozone keyboard layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lite-code
Patch Set: address review comments (Wez) + cleanup Created 6 years 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
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 4
5 #include "ui/ozone/platform/test/ozone_platform_test.h" 5 #include "ui/ozone/platform/test/ozone_platform_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
10 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
11 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
10 #include "ui/events/platform/platform_event_source.h" 12 #include "ui/events/platform/platform_event_source.h"
11 #include "ui/ozone/common/native_display_delegate_ozone.h" 13 #include "ui/ozone/common/native_display_delegate_ozone.h"
12 #include "ui/ozone/platform/test/test_window.h" 14 #include "ui/ozone/platform/test/test_window.h"
13 #include "ui/ozone/platform/test/test_window_manager.h" 15 #include "ui/ozone/platform/test/test_window_manager.h"
14 #include "ui/ozone/public/cursor_factory_ozone.h" 16 #include "ui/ozone/public/cursor_factory_ozone.h"
15 #include "ui/ozone/public/gpu_platform_support.h" 17 #include "ui/ozone/public/gpu_platform_support.h"
16 #include "ui/ozone/public/gpu_platform_support_host.h" 18 #include "ui/ozone/public/gpu_platform_support_host.h"
17 #include "ui/ozone/public/ozone_platform.h" 19 #include "ui/ozone/public/ozone_platform.h"
18 #include "ui/ozone/public/ozone_switches.h" 20 #include "ui/ozone/public/ozone_switches.h"
19 #include "ui/ozone/public/system_input_injector.h" 21 #include "ui/ozone/public/system_input_injector.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { 57 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
56 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone()); 58 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
57 } 59 }
58 60
59 void InitializeUI() override { 61 void InitializeUI() override {
60 window_manager_.reset(new TestWindowManager(file_path_)); 62 window_manager_.reset(new TestWindowManager(file_path_));
61 window_manager_->Initialize(); 63 window_manager_->Initialize();
62 // This unbreaks tests that create their own. 64 // This unbreaks tests that create their own.
63 if (!PlatformEventSource::GetInstance()) 65 if (!PlatformEventSource::GetInstance())
64 platform_event_source_ = PlatformEventSource::CreateDefault(); 66 platform_event_source_ = PlatformEventSource::CreateDefault();
67 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
68 make_scoped_ptr(new StubKeyboardLayoutEngine()));
65 69
66 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); 70 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
67 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); 71 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
68 } 72 }
69 73
70 void InitializeGPU() override { 74 void InitializeGPU() override {
71 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); 75 gpu_platform_support_.reset(CreateStubGpuPlatformSupport());
72 } 76 }
73 77
74 private: 78 private:
(...skipping 11 matching lines...) Expand all
86 90
87 OzonePlatform* CreateOzonePlatformTest() { 91 OzonePlatform* CreateOzonePlatformTest() {
88 CommandLine* cmd = CommandLine::ForCurrentProcess(); 92 CommandLine* cmd = CommandLine::ForCurrentProcess();
89 base::FilePath location; 93 base::FilePath location;
90 if (cmd->HasSwitch(switches::kOzoneDumpFile)) 94 if (cmd->HasSwitch(switches::kOzoneDumpFile))
91 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); 95 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile);
92 return new OzonePlatformTest(location); 96 return new OzonePlatformTest(location);
93 } 97 }
94 98
95 } // namespace ui 99 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698