| 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" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 PathService::Get(base::DIR_MODULE, &extensions_shell_and_test_pak_path); | 81 PathService::Get(base::DIR_MODULE, &extensions_shell_and_test_pak_path); |
| 82 ui::ResourceBundle::InitSharedInstanceWithPakPath( | 82 ui::ResourceBundle::InitSharedInstanceWithPakPath( |
| 83 extensions_shell_and_test_pak_path.AppendASCII( | 83 extensions_shell_and_test_pak_path.AppendASCII( |
| 84 "extensions_shell_and_test.pak")); | 84 "extensions_shell_and_test.pak")); |
| 85 | 85 |
| 86 client_.reset(new extensions::TestExtensionsClient()); | 86 client_.reset(new extensions::TestExtensionsClient()); |
| 87 extensions::ExtensionsClient::Set(client_.get()); | 87 extensions::ExtensionsClient::Set(client_.get()); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void ExtensionsTestSuite::Shutdown() { | 90 void ExtensionsTestSuite::Shutdown() { |
| 91 extensions::ExtensionsClient::Set(NULL); | 91 extensions::ExtensionsClient::Set(nullptr); |
| 92 client_.reset(); | 92 client_.reset(); |
| 93 | 93 |
| 94 ui::ResourceBundle::CleanupSharedInstance(); | 94 ui::ResourceBundle::CleanupSharedInstance(); |
| 95 content::ContentTestSuiteBase::Shutdown(); | 95 content::ContentTestSuiteBase::Shutdown(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace | 98 } // namespace |
| 99 | 99 |
| 100 int main(int argc, char** argv) { | 100 int main(int argc, char** argv) { |
| 101 content::UnitTestTestSuite test_suite(new ExtensionsTestSuite(argc, argv)); | 101 content::UnitTestTestSuite test_suite(new ExtensionsTestSuite(argc, argv)); |
| 102 | 102 |
| 103 mojo::embedder::test::InitWithSimplePlatformSupport(); | 103 mojo::embedder::test::InitWithSimplePlatformSupport(); |
| 104 return base::LaunchUnitTests(argc, | 104 return base::LaunchUnitTests(argc, |
| 105 argv, | 105 argv, |
| 106 base::Bind(&content::UnitTestTestSuite::Run, | 106 base::Bind(&content::UnitTestTestSuite::Run, |
| 107 base::Unretained(&test_suite))); | 107 base::Unretained(&test_suite))); |
| 108 } | 108 } |
| OLD | NEW |