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 "content/public/test/test_launcher.h" | 5 #include "content/public/test/test_launcher.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 ~ContentBrowserTestSuite() override {} | 51 ~ContentBrowserTestSuite() override {} |
52 | 52 |
53 protected: | 53 protected: |
54 void Initialize() override { | 54 void Initialize() override { |
55 #if defined(OS_ANDROID) | 55 #if defined(OS_ANDROID) |
56 base::i18n::AllowMultipleInitializeCallsForTesting(); | 56 base::i18n::AllowMultipleInitializeCallsForTesting(); |
57 base::i18n::InitializeICU(); | 57 base::i18n::InitializeICU(); |
58 | 58 |
59 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 59 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
60 gin::V8Initializer::LoadV8Snapshot(); | 60 gin::V8Initializer::LoadV8Snapshot(); |
| 61 gin::V8Initializer::LoadV8Natives(); |
61 #endif | 62 #endif |
62 | 63 |
63 // This needs to be done before base::TestSuite::Initialize() is called, | 64 // This needs to be done before base::TestSuite::Initialize() is called, |
64 // as it also tries to set MessagePumpForUIFactory. | 65 // as it also tries to set MessagePumpForUIFactory. |
65 if (!base::MessageLoop::InitMessagePumpForUIFactory( | 66 if (!base::MessageLoop::InitMessagePumpForUIFactory( |
66 &CreateMessagePumpForUI)) | 67 &CreateMessagePumpForUI)) |
67 VLOG(0) << "MessagePumpForUIFactory already set, unable to override."; | 68 VLOG(0) << "MessagePumpForUIFactory already set, unable to override."; |
68 | 69 |
69 // For all other platforms, we call ContentMain for browser tests which goes | 70 // For all other platforms, we call ContentMain for browser tests which goes |
70 // through the normal browser initialization paths. For Android, we must set | 71 // through the normal browser initialization paths. For Android, we must set |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); | 122 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); |
122 }; | 123 }; |
123 | 124 |
124 } // namespace content | 125 } // namespace content |
125 | 126 |
126 int main(int argc, char** argv) { | 127 int main(int argc, char** argv) { |
127 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); | 128 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); |
128 content::ContentTestLauncherDelegate launcher_delegate; | 129 content::ContentTestLauncherDelegate launcher_delegate; |
129 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); | 130 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); |
130 } | 131 } |
OLD | NEW |