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

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

Issue 1061733002: Remove windows/mac/ios specific code from //ui (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix default try set Created 5 years, 8 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
« no previous file with comments | « ui/gfx/test/DEPS ('k') | ui/gfx/test/ui_cocoa_test_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/test/launcher/unit_test_launcher.h" 9 #include "base/test/launcher/unit_test_launcher.h"
10 #include "base/test/test_suite.h" 10 #include "base/test/test_suite.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 #if defined(OS_ANDROID) 13 #if defined(OS_ANDROID)
14 #include "base/android/jni_android.h" 14 #include "base/android/jni_android.h"
15 #include "ui/gfx/android/gfx_jni_registrar.h" 15 #include "ui/gfx/android/gfx_jni_registrar.h"
16 #endif 16 #endif
17 17
18 #if defined(OS_MACOSX) && !defined(OS_IOS)
19 #include "base/test/mock_chrome_application_mac.h"
20 #endif
21
22 namespace { 18 namespace {
23 19
24 class GfxTestSuite : public base::TestSuite { 20 class GfxTestSuite : public base::TestSuite {
25 public: 21 public:
26 GfxTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} 22 GfxTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
27 23
28 protected: 24 protected:
29 void Initialize() override { 25 void Initialize() override {
30 base::TestSuite::Initialize(); 26 base::TestSuite::Initialize();
31 27
32 #if defined(OS_ANDROID) 28 #if defined(OS_ANDROID)
33 gfx::android::RegisterJni(base::android::AttachCurrentThread()); 29 gfx::android::RegisterJni(base::android::AttachCurrentThread());
34 #endif 30 #endif
35
36 #if defined(OS_MACOSX) && !defined(OS_IOS)
37 mock_cr_app::RegisterMockCrApp();
38 #endif
39 } 31 }
40 32
41 void Shutdown() override { 33 void Shutdown() override {
42 base::TestSuite::Shutdown(); 34 base::TestSuite::Shutdown();
43 } 35 }
44 36
45 private: 37 private:
46 DISALLOW_COPY_AND_ASSIGN(GfxTestSuite); 38 DISALLOW_COPY_AND_ASSIGN(GfxTestSuite);
47 }; 39 };
48 40
49 } // namespace 41 } // namespace
50 42
51 int main(int argc, char** argv) { 43 int main(int argc, char** argv) {
52 GfxTestSuite test_suite(argc, argv); 44 GfxTestSuite test_suite(argc, argv);
53 45
54 return base::LaunchUnitTests( 46 return base::LaunchUnitTests(
55 argc, 47 argc,
56 argv, 48 argv,
57 base::Bind(&GfxTestSuite::Run, base::Unretained(&test_suite))); 49 base::Bind(&GfxTestSuite::Run, base::Unretained(&test_suite)));
58 } 50 }
OLDNEW
« no previous file with comments | « ui/gfx/test/DEPS ('k') | ui/gfx/test/ui_cocoa_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698