OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/metrics/statistics_recorder.h" | 8 #include "base/metrics/statistics_recorder.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/test/launcher/unit_test_launcher.h" | 10 #include "base/test/launcher/unit_test_launcher.h" |
11 #include "base/test/test_suite.h" | 11 #include "base/test/test_suite.h" |
12 #include "components/content_settings/core/common/content_settings_pattern.h" | 12 #include "components/content_settings/core/common/content_settings_pattern.h" |
13 #include "content/public/test/test_content_client_initializer.h" | 13 #include "content/public/test/test_content_client_initializer.h" |
| 14 #include "content/public/test/unittest_test_suite.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
16 #include "ui/base/ui_base_paths.h" | 17 #include "ui/base/ui_base_paths.h" |
17 #include "url/url_util.h" | 18 #include "url/url_util.h" |
18 | 19 |
19 #if !defined(OS_IOS) | 20 #if !defined(OS_IOS) |
20 #include "ui/gl/gl_surface.h" | 21 #include "ui/gl/gl_surface.h" |
21 #endif | 22 #endif |
22 | 23 |
23 #if defined(OS_ANDROID) | 24 #if defined(OS_ANDROID) |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 101 |
101 private: | 102 private: |
102 scoped_ptr<content::TestContentClientInitializer> content_initializer_; | 103 scoped_ptr<content::TestContentClientInitializer> content_initializer_; |
103 | 104 |
104 DISALLOW_COPY_AND_ASSIGN(ComponentsUnitTestEventListener); | 105 DISALLOW_COPY_AND_ASSIGN(ComponentsUnitTestEventListener); |
105 }; | 106 }; |
106 | 107 |
107 } // namespace | 108 } // namespace |
108 | 109 |
109 int main(int argc, char** argv) { | 110 int main(int argc, char** argv) { |
110 ComponentsTestSuite test_suite(argc, argv); | 111 // UnitTestTestSuite initializes blink. |
| 112 content::UnitTestTestSuite test_suite(new ComponentsTestSuite(argc, argv)); |
111 | 113 |
112 // The listener will set up common test environment for all components unit | 114 // The listener will set up common test environment for all components unit |
113 // tests. | 115 // tests. |
114 testing::TestEventListeners& listeners = | 116 testing::TestEventListeners& listeners = |
115 testing::UnitTest::GetInstance()->listeners(); | 117 testing::UnitTest::GetInstance()->listeners(); |
116 listeners.Append(new ComponentsUnitTestEventListener()); | 118 listeners.Append(new ComponentsUnitTestEventListener()); |
117 | 119 |
118 return base::LaunchUnitTests( | 120 return base::LaunchUnitTests( |
119 argc, argv, base::Bind(&base::TestSuite::Run, | 121 argc, argv, base::Bind(&content::UnitTestTestSuite::Run, |
120 base::Unretained(&test_suite))); | 122 base::Unretained(&test_suite))); |
121 } | 123 } |
OLD | NEW |