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

Unified Diff: ui/ozone/platform/test/ozone_platform_test.cc

Issue 419993003: Adds a do-nothing ozone platform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds a do-nothing ozone platform when --ozone-dump-file is not specified Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/ozone/platform/test/test_window.cc » ('j') | ui/ozone/platform/test/test_window.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/test/ozone_platform_test.cc
diff --git a/ui/ozone/platform/test/ozone_platform_test.cc b/ui/ozone/platform/test/ozone_platform_test.cc
index b35597f8e8e276da162b3bb2409a0065a1e08fa3..755d429733d670c00a3ec0ae9c31a6bc771d0a58 100644
--- a/ui/ozone/platform/test/ozone_platform_test.cc
+++ b/ui/ozone/platform/test/ozone_platform_test.cc
@@ -6,7 +6,6 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
-#include "ui/events/ozone/device/device_manager.h"
#include "ui/ozone/platform/test/test_cursor_factory.h"
#include "ui/ozone/platform/test/test_event_factory.h"
#include "ui/ozone/platform/test/test_window.h"
@@ -70,20 +69,22 @@ class OzonePlatformTest : public OzonePlatform {
#endif
virtual void InitializeUI() OVERRIDE {
- device_manager_ = CreateDeviceManager();
window_manager_.reset(new TestWindowManager(file_path_));
window_manager_->Initialize();
event_factory_ozone_.reset(new TestEventFactory());
+ if (file_path_.empty())
alexst (slow to review) 2014/07/31 02:27:24 Is there a particular reason you chose to skip the
dnicoara 2014/07/31 02:51:31 From personal experience, the following factories
varkha 2014/08/07 00:17:10 Acknowledged.
varkha 2014/08/07 00:17:10 Done.
+ return;
cursor_factory_ozone_.reset(new TestCursorFactory());
gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
}
virtual void InitializeGPU() OVERRIDE {
+ if (file_path_.empty())
+ return;
gpu_platform_support_.reset(CreateStubGpuPlatformSupport());
}
private:
- scoped_ptr<DeviceManager> device_manager_;
scoped_ptr<TestWindowManager> window_manager_;
scoped_ptr<TestEventFactory> event_factory_ozone_;
scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
@@ -98,7 +99,7 @@ class OzonePlatformTest : public OzonePlatform {
OzonePlatform* CreateOzonePlatformTest() {
CommandLine* cmd = CommandLine::ForCurrentProcess();
- base::FilePath location = base::FilePath("/dev/null");
+ base::FilePath location;
if (cmd->HasSwitch(switches::kOzoneDumpFile))
location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile);
return new OzonePlatformTest(location);
« no previous file with comments | « no previous file | ui/ozone/platform/test/test_window.cc » ('j') | ui/ozone/platform/test/test_window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698