| OLD | NEW |
| 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" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 private: | 41 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(UIBaseTestSuite); | 42 DISALLOW_COPY_AND_ASSIGN(UIBaseTestSuite); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 UIBaseTestSuite::UIBaseTestSuite(int argc, char** argv) | 45 UIBaseTestSuite::UIBaseTestSuite(int argc, char** argv) |
| 46 : base::TestSuite(argc, argv) {} | 46 : base::TestSuite(argc, argv) {} |
| 47 | 47 |
| 48 void UIBaseTestSuite::Initialize() { | 48 void UIBaseTestSuite::Initialize() { |
| 49 base::TestSuite::Initialize(); | 49 base::TestSuite::Initialize(); |
| 50 | 50 |
| 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) | 51 #if defined(OS_WIN) |
| 59 gfx::InitDeviceScaleFactor(1.0); | 52 gfx::InitDeviceScaleFactor(1.0); |
| 60 #endif | 53 #endif |
| 61 | 54 |
| 62 #if defined(OS_ANDROID) | 55 #if defined(OS_ANDROID) |
| 63 // Register JNI bindings for android. | 56 // Register JNI bindings for android. |
| 64 gfx::android::RegisterJni(base::android::AttachCurrentThread()); | 57 gfx::android::RegisterJni(base::android::AttachCurrentThread()); |
| 65 ui::android::RegisterJni(base::android::AttachCurrentThread()); | 58 ui::android::RegisterJni(base::android::AttachCurrentThread()); |
| 66 #endif | 59 #endif |
| 67 | 60 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } // namespace | 104 } // namespace |
| 112 | 105 |
| 113 int main(int argc, char** argv) { | 106 int main(int argc, char** argv) { |
| 114 UIBaseTestSuite test_suite(argc, argv); | 107 UIBaseTestSuite test_suite(argc, argv); |
| 115 | 108 |
| 116 return base::LaunchUnitTests(argc, | 109 return base::LaunchUnitTests(argc, |
| 117 argv, | 110 argv, |
| 118 base::Bind(&UIBaseTestSuite::Run, | 111 base::Bind(&UIBaseTestSuite::Run, |
| 119 base::Unretained(&test_suite))); | 112 base::Unretained(&test_suite))); |
| 120 } | 113 } |
| OLD | NEW |