| 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/base_paths.h" | 5 #include "base/base_paths.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.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 "content/public/common/content_client.h" | 10 #include "content/public/common/content_client.h" |
| 11 #include "content/public/test/content_test_suite_base.h" | 11 #include "content/public/test/content_test_suite_base.h" |
| 12 #include "content/public/test/unittest_test_suite.h" | 12 #include "content/public/test/unittest_test_suite.h" |
| 13 #include "extensions/common/constants.h" | 13 #include "extensions/common/constants.h" |
| 14 #include "extensions/common/extension_paths.h" | 14 #include "extensions/common/extension_paths.h" |
| 15 #include "extensions/test/test_extensions_client.h" | 15 #include "extensions/test/test_extensions_client.h" |
| 16 #include "mojo/embedder/embedder.h" |
| 16 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
| 17 | 18 |
| 18 namespace { | 19 namespace { |
| 19 | 20 |
| 20 // Content client that exists only to register chrome-extension:// scheme with | 21 // Content client that exists only to register chrome-extension:// scheme with |
| 21 // the url module. | 22 // the url module. |
| 22 // TODO(jamescook): Should this be merged with ShellContentClient? Should this | 23 // TODO(jamescook): Should this be merged with ShellContentClient? Should this |
| 23 // be a persistent object available to tests? | 24 // be a persistent object available to tests? |
| 24 class ExtensionsContentClient : public content::ContentClient { | 25 class ExtensionsContentClient : public content::ContentClient { |
| 25 public: | 26 public: |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 90 |
| 90 ui::ResourceBundle::CleanupSharedInstance(); | 91 ui::ResourceBundle::CleanupSharedInstance(); |
| 91 content::ContentTestSuiteBase::Shutdown(); | 92 content::ContentTestSuiteBase::Shutdown(); |
| 92 } | 93 } |
| 93 | 94 |
| 94 } // namespace | 95 } // namespace |
| 95 | 96 |
| 96 int main(int argc, char** argv) { | 97 int main(int argc, char** argv) { |
| 97 content::UnitTestTestSuite test_suite(new ExtensionsTestSuite(argc, argv)); | 98 content::UnitTestTestSuite test_suite(new ExtensionsTestSuite(argc, argv)); |
| 98 | 99 |
| 100 mojo::embedder::Init(); |
| 99 return base::LaunchUnitTests(argc, | 101 return base::LaunchUnitTests(argc, |
| 100 argv, | 102 argv, |
| 101 base::Bind(&content::UnitTestTestSuite::Run, | 103 base::Bind(&content::UnitTestTestSuite::Run, |
| 102 base::Unretained(&test_suite))); | 104 base::Unretained(&test_suite))); |
| 103 } | 105 } |
| OLD | NEW |