| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <memory> |
| 6 |
| 7 #include "base/bind.h" |
| 8 #include "base/macros.h" |
| 9 #include "base/sys_info.h" |
| 10 #include "blimp/engine/app/test_content_main_delegate.h" |
| 11 #include "content/public/test/content_test_suite_base.h" |
| 12 #include "content/public/test/test_launcher.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 |
| 15 namespace blimp { |
| 16 namespace { |
| 17 |
| 18 class BlimpTestLauncherDelegate : public content::TestLauncherDelegate { |
| 19 public: |
| 20 BlimpTestLauncherDelegate() {} |
| 21 ~BlimpTestLauncherDelegate() override {} |
| 22 |
| 23 // content::TestLauncherDelegate implementation. |
| 24 int RunTestSuite(int argc, char** argv) override { |
| 25 return base::TestSuite(argc, argv).Run(); |
| 26 } |
| 27 |
| 28 bool AdjustChildProcessCommandLine( |
| 29 base::CommandLine* command_line, |
| 30 const base::FilePath& temp_data_dir) override { |
| 31 return true; |
| 32 } |
| 33 |
| 34 content::ContentMainDelegate* CreateContentMainDelegate() override { |
| 35 return new engine::TestContentMainDelegate(); |
| 36 } |
| 37 |
| 38 private: |
| 39 DISALLOW_COPY_AND_ASSIGN(BlimpTestLauncherDelegate); |
| 40 }; |
| 41 |
| 42 } // namespace |
| 43 } // namespace blimp |
| 44 |
| 45 int main(int argc, char** argv) { |
| 46 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); |
| 47 blimp::BlimpTestLauncherDelegate launcher_delegate; |
| 48 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); |
| 49 } |
| OLD | NEW |