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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 content::ContentTestSuiteBase::Initialize(); | 67 content::ContentTestSuiteBase::Initialize(); |
68 gfx::GLSurface::InitializeOneOffForTests(); | 68 gfx::GLSurface::InitializeOneOffForTests(); |
69 | 69 |
70 // Register the chrome-extension:// scheme via this circuitous path. Note | 70 // Register the chrome-extension:// scheme via this circuitous path. Note |
71 // that this does not persistently set up a ContentClient; individual tests | 71 // that this does not persistently set up a ContentClient; individual tests |
72 // must use content::SetContentClient(). | 72 // must use content::SetContentClient(). |
73 { | 73 { |
74 ExtensionsContentClient content_client; | 74 ExtensionsContentClient content_client; |
75 RegisterContentSchemes(&content_client); | 75 RegisterContentSchemes(&content_client); |
76 } | 76 } |
| 77 RegisterInProcessThreads(); |
77 | 78 |
78 extensions::RegisterPathProvider(); | 79 extensions::RegisterPathProvider(); |
79 | 80 |
80 base::FilePath extensions_shell_and_test_pak_path; | 81 base::FilePath extensions_shell_and_test_pak_path; |
81 PathService::Get(base::DIR_MODULE, &extensions_shell_and_test_pak_path); | 82 PathService::Get(base::DIR_MODULE, &extensions_shell_and_test_pak_path); |
82 ui::ResourceBundle::InitSharedInstanceWithPakPath( | 83 ui::ResourceBundle::InitSharedInstanceWithPakPath( |
83 extensions_shell_and_test_pak_path.AppendASCII( | 84 extensions_shell_and_test_pak_path.AppendASCII( |
84 "extensions_shell_and_test.pak")); | 85 "extensions_shell_and_test.pak")); |
85 | 86 |
86 client_.reset(new extensions::TestExtensionsClient()); | 87 client_.reset(new extensions::TestExtensionsClient()); |
(...skipping 12 matching lines...) Expand all Loading... |
99 | 100 |
100 int main(int argc, char** argv) { | 101 int main(int argc, char** argv) { |
101 content::UnitTestTestSuite test_suite(new ExtensionsTestSuite(argc, argv)); | 102 content::UnitTestTestSuite test_suite(new ExtensionsTestSuite(argc, argv)); |
102 | 103 |
103 mojo::embedder::test::InitWithSimplePlatformSupport(); | 104 mojo::embedder::test::InitWithSimplePlatformSupport(); |
104 return base::LaunchUnitTests(argc, | 105 return base::LaunchUnitTests(argc, |
105 argv, | 106 argv, |
106 base::Bind(&content::UnitTestTestSuite::Run, | 107 base::Bind(&content::UnitTestTestSuite::Run, |
107 base::Unretained(&test_suite))); | 108 base::Unretained(&test_suite))); |
108 } | 109 } |
OLD | NEW |