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

Side by Side Diff: ui/gl/test/run_all_unittests.cc

Issue 2156093004: Use mojo for cursor control in ozone drm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/test/launcher/unit_test_launcher.h" 7 #include "base/test/launcher/unit_test_launcher.h"
8 #include "base/test/test_suite.h" 8 #include "base/test/test_suite.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "ui/gl/test/gl_image_test_support.h" 10 #include "ui/gl/test/gl_image_test_support.h"
(...skipping 14 matching lines...) Expand all
25 public: 25 public:
26 GlTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) { 26 GlTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {
27 } 27 }
28 28
29 protected: 29 protected:
30 void Initialize() override { 30 void Initialize() override {
31 base::TestSuite::Initialize(); 31 base::TestSuite::Initialize();
32 #if defined(USE_OZONE) 32 #if defined(USE_OZONE)
33 // Make Ozone run in single-process mode, where it doesn't expect a GPU 33 // Make Ozone run in single-process mode, where it doesn't expect a GPU
34 // process and it spawns and starts its own DRM thread. 34 // process and it spawns and starts its own DRM thread.
35 base::CommandLine::ForCurrentProcess()->AppendSwitch( 35 ui::OzonePlatform::InitParams params;
36 "mojo-platform-channel-handle"); 36 params.single_process = true;
37 main_loop_.reset(new base::MessageLoopForUI()); 37 ui::OzonePlatform::InitializeForUI(params);
38 ui::OzonePlatform::InitializeForUI();
39 #endif 38 #endif
40 39
41 #if defined(OS_MACOSX) && !defined(OS_IOS) 40 #if defined(OS_MACOSX) && !defined(OS_IOS)
42 mock_cr_app::RegisterMockCrApp(); 41 mock_cr_app::RegisterMockCrApp();
43 #endif 42 #endif
44 } 43 }
45 44
46 void Shutdown() override { 45 void Shutdown() override {
47 base::TestSuite::Shutdown(); 46 base::TestSuite::Shutdown();
48 } 47 }
(...skipping 10 matching lines...) Expand all
59 } // namespace 58 } // namespace
60 59
61 int main(int argc, char** argv) { 60 int main(int argc, char** argv) {
62 GlTestSuite test_suite(argc, argv); 61 GlTestSuite test_suite(argc, argv);
63 62
64 return base::LaunchUnitTests( 63 return base::LaunchUnitTests(
65 argc, 64 argc,
66 argv, 65 argv,
67 base::Bind(&GlTestSuite::Run, base::Unretained(&test_suite))); 66 base::Bind(&GlTestSuite::Run, base::Unretained(&test_suite)));
68 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698