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

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

Issue 1208603002: content: implement unittests backend for Ozone GBM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix NavigationControllerTest failure Created 5 years, 5 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
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" 10 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 overlay_manager_.reset(new StubOverlayManager()); 89 overlay_manager_.reset(new StubOverlayManager());
90 input_controller_ = CreateStubInputController(); 90 input_controller_ = CreateStubInputController();
91 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); 91 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
92 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); 92 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
93 } 93 }
94 94
95 void InitializeGPU() override { 95 void InitializeGPU() override {
96 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); 96 gpu_platform_support_.reset(CreateStubGpuPlatformSupport());
97 } 97 }
98 98
99 void InitializeTest() override {
100 InitializeUI();
101 InitializeGPU();
102 }
103
99 private: 104 private:
100 scoped_ptr<TestWindowManager> window_manager_; 105 scoped_ptr<TestWindowManager> window_manager_;
101 scoped_ptr<PlatformEventSource> platform_event_source_; 106 scoped_ptr<PlatformEventSource> platform_event_source_;
102 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; 107 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
103 scoped_ptr<InputController> input_controller_; 108 scoped_ptr<InputController> input_controller_;
104 scoped_ptr<GpuPlatformSupport> gpu_platform_support_; 109 scoped_ptr<GpuPlatformSupport> gpu_platform_support_;
105 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; 110 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
106 scoped_ptr<OverlayManagerOzone> overlay_manager_; 111 scoped_ptr<OverlayManagerOzone> overlay_manager_;
107 base::FilePath file_path_; 112 base::FilePath file_path_;
108 113
109 DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest); 114 DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest);
110 }; 115 };
111 116
112 } // namespace 117 } // namespace
113 118
114 OzonePlatform* CreateOzonePlatformTest() { 119 OzonePlatform* CreateOzonePlatformTest() {
115 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 120 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
116 base::FilePath location; 121 base::FilePath location;
117 if (cmd->HasSwitch(switches::kOzoneDumpFile)) 122 if (cmd->HasSwitch(switches::kOzoneDumpFile))
118 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); 123 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile);
119 return new OzonePlatformTest(location); 124 return new OzonePlatformTest(location);
120 } 125 }
121 126
122 } // namespace ui 127 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698