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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/test/launcher/unit_test_launcher.h" | 11 #include "base/test/launcher/unit_test_launcher.h" |
12 #include "base/test/test_io_thread.h" | 12 #include "base/test/test_io_thread.h" |
13 #include "content/public/common/content_client.h" | 13 #include "content/public/common/content_client.h" |
14 #include "content/public/test/content_test_suite_base.h" | 14 #include "content/public/test/content_test_suite_base.h" |
15 #include "content/public/test/unittest_test_suite.h" | 15 #include "content/public/test/unittest_test_suite.h" |
16 #include "extensions/common/constants.h" | 16 #include "extensions/common/constants.h" |
17 #include "extensions/common/extension_paths.h" | 17 #include "extensions/common/extension_paths.h" |
18 #include "extensions/test/test_extensions_client.h" | 18 #include "extensions/test/test_extensions_client.h" |
19 #include "mojo/edk/test/scoped_ipc_support.h" | |
20 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
21 #include "ui/gl/test/gl_surface_test_support.h" | 20 #include "ui/gl/test/gl_surface_test_support.h" |
22 #include "url/url_util.h" | 21 #include "url/url_util.h" |
23 | 22 |
24 namespace { | 23 namespace { |
25 | 24 |
26 // Content client that exists only to register chrome-extension:// scheme with | 25 // Content client that exists only to register chrome-extension:// scheme with |
27 // the url module. | 26 // the url module. |
28 // TODO(jamescook): Should this be merged with ShellContentClient? Should this | 27 // TODO(jamescook): Should this be merged with ShellContentClient? Should this |
29 // be a persistent object available to tests? | 28 // be a persistent object available to tests? |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 client_.reset(); | 92 client_.reset(); |
94 | 93 |
95 ui::ResourceBundle::CleanupSharedInstance(); | 94 ui::ResourceBundle::CleanupSharedInstance(); |
96 content::ContentTestSuiteBase::Shutdown(); | 95 content::ContentTestSuiteBase::Shutdown(); |
97 } | 96 } |
98 | 97 |
99 } // namespace | 98 } // namespace |
100 | 99 |
101 int main(int argc, char** argv) { | 100 int main(int argc, char** argv) { |
102 content::UnitTestTestSuite test_suite(new ExtensionsTestSuite(argc, argv)); | 101 content::UnitTestTestSuite test_suite(new ExtensionsTestSuite(argc, argv)); |
103 | |
104 base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart); | |
105 mojo::edk::test::ScopedIPCSupport ipc_support(test_io_thread.task_runner()); | |
106 | |
107 return base::LaunchUnitTests(argc, | 102 return base::LaunchUnitTests(argc, |
108 argv, | 103 argv, |
109 base::Bind(&content::UnitTestTestSuite::Run, | 104 base::Bind(&content::UnitTestTestSuite::Run, |
110 base::Unretained(&test_suite))); | 105 base::Unretained(&test_suite))); |
111 } | 106 } |
OLD | NEW |