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

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

Issue 738513002: Move the tests in ui/chromeos to a new target: ui_chromeos_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 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/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/test/launcher/unit_test_launcher.h" 8 #include "base/test/launcher/unit_test_launcher.h"
9 #include "base/test/test_suite.h" 9 #include "base/test/test_suite.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "ui/base/resource/resource_bundle.h" 11 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/base/ui_base_paths.h" 12 #include "ui/base/ui_base_paths.h"
13 #include "ui/gl/gl_surface.h"
14 13
15 #if defined(OS_ANDROID) 14 #if defined(OS_ANDROID)
16 #include "base/android/jni_android.h" 15 #include "base/android/jni_android.h"
17 #include "ui/base/android/ui_base_jni_registrar.h" 16 #include "ui/base/android/ui_base_jni_registrar.h"
18 #include "ui/gfx/android/gfx_jni_registrar.h" 17 #include "ui/gfx/android/gfx_jni_registrar.h"
19 #endif 18 #endif
20 19
21 #if defined(OS_MACOSX) && !defined(OS_IOS) 20 #if defined(OS_MACOSX) && !defined(OS_IOS)
22 #include "base/mac/bundle_locations.h" 21 #include "base/mac/bundle_locations.h"
23 #include "base/test/mock_chrome_application_mac.h" 22 #include "base/test/mock_chrome_application_mac.h"
(...skipping 17 matching lines...) Expand all
41 private: 40 private:
42 DISALLOW_COPY_AND_ASSIGN(UIBaseTestSuite); 41 DISALLOW_COPY_AND_ASSIGN(UIBaseTestSuite);
43 }; 42 };
44 43
45 UIBaseTestSuite::UIBaseTestSuite(int argc, char** argv) 44 UIBaseTestSuite::UIBaseTestSuite(int argc, char** argv)
46 : base::TestSuite(argc, argv) {} 45 : base::TestSuite(argc, argv) {}
47 46
48 void UIBaseTestSuite::Initialize() { 47 void UIBaseTestSuite::Initialize() {
49 base::TestSuite::Initialize(); 48 base::TestSuite::Initialize();
50 49
51 #if defined(OS_CHROMEOS)
52 // Needed for the tests in ui/chromeos.
53 // TODO(pkotwicz): Move the tests in ui/chromeos to their own test suite.
54 // (crbug.com/432538)
55 gfx::GLSurface::InitializeOneOffForTests();
56 #endif
57
58 #if defined(OS_WIN) 50 #if defined(OS_WIN)
59 gfx::InitDeviceScaleFactor(1.0); 51 gfx::InitDeviceScaleFactor(1.0);
60 #endif 52 #endif
61 53
62 #if defined(OS_ANDROID) 54 #if defined(OS_ANDROID)
63 // Register JNI bindings for android. 55 // Register JNI bindings for android.
64 gfx::android::RegisterJni(base::android::AttachCurrentThread()); 56 gfx::android::RegisterJni(base::android::AttachCurrentThread());
65 ui::android::RegisterJni(base::android::AttachCurrentThread()); 57 ui::android::RegisterJni(base::android::AttachCurrentThread());
66 #endif 58 #endif
67 59
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } // namespace 103 } // namespace
112 104
113 int main(int argc, char** argv) { 105 int main(int argc, char** argv) {
114 UIBaseTestSuite test_suite(argc, argv); 106 UIBaseTestSuite test_suite(argc, argv);
115 107
116 return base::LaunchUnitTests(argc, 108 return base::LaunchUnitTests(argc,
117 argv, 109 argv,
118 base::Bind(&UIBaseTestSuite::Run, 110 base::Bind(&UIBaseTestSuite::Run,
119 base::Unretained(&test_suite))); 111 base::Unretained(&test_suite)));
120 } 112 }
OLDNEW
« ui/base/BUILD.gn ('K') | « ui/base/DEPS ('k') | ui/base/ui_base_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698