| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 | 76 |
| 77 protected: | 77 protected: |
| 78 virtual void Initialize() OVERRIDE { | 78 virtual void Initialize() OVERRIDE { |
| 79 | 79 |
| 80 #if defined(OS_ANDROID) | 80 #if defined(OS_ANDROID) |
| 81 // This needs to be done before base::TestSuite::Initialize() is called, | 81 // This needs to be done before base::TestSuite::Initialize() is called, |
| 82 // as it also tries to set MessagePumpForUIFactory. | 82 // as it also tries to set MessagePumpForUIFactory. |
| 83 if (!base::MessageLoop::InitMessagePumpForUIFactory( | 83 if (!base::MessageLoop::InitMessagePumpForUIFactory( |
| 84 &CreateMessagePumpForUI)) | 84 &CreateMessagePumpForUI)) |
| 85 LOG(INFO) << "MessagePumpForUIFactory already set, unable to override."; | 85 VLOG(0) << "MessagePumpForUIFactory already set, unable to override."; |
| 86 #endif | 86 #endif |
| 87 | 87 |
| 88 ContentTestSuiteBase::Initialize(); | 88 ContentTestSuiteBase::Initialize(); |
| 89 | 89 |
| 90 testing::TestEventListeners& listeners = | 90 testing::TestEventListeners& listeners = |
| 91 testing::UnitTest::GetInstance()->listeners(); | 91 testing::UnitTest::GetInstance()->listeners(); |
| 92 listeners.Append(new ContentShellTestSuiteInitializer); | 92 listeners.Append(new ContentShellTestSuiteInitializer); |
| 93 } | 93 } |
| 94 virtual void Shutdown() OVERRIDE { | 94 virtual void Shutdown() OVERRIDE { |
| 95 base::TestSuite::Shutdown(); | 95 base::TestSuite::Shutdown(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); | 129 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace content | 132 } // namespace content |
| 133 | 133 |
| 134 int main(int argc, char** argv) { | 134 int main(int argc, char** argv) { |
| 135 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); | 135 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); |
| 136 content::ContentTestLauncherDelegate launcher_delegate; | 136 content::ContentTestLauncherDelegate launcher_delegate; |
| 137 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); | 137 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); |
| 138 } | 138 } |
| OLD | NEW |