| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 int RunTestSuite(int argc, char** argv) override { | 104 int RunTestSuite(int argc, char** argv) override { |
| 105 return ContentBrowserTestSuite(argc, argv).Run(); | 105 return ContentBrowserTestSuite(argc, argv).Run(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 bool AdjustChildProcessCommandLine( | 108 bool AdjustChildProcessCommandLine( |
| 109 base::CommandLine* command_line, | 109 base::CommandLine* command_line, |
| 110 const base::FilePath& temp_data_dir) override { | 110 const base::FilePath& temp_data_dir) override { |
| 111 command_line->AppendSwitchPath(switches::kContentShellDataPath, | 111 command_line->AppendSwitchPath(switches::kContentShellDataPath, |
| 112 temp_data_dir); | 112 temp_data_dir); |
| 113 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); | 113 command_line->AppendSwitchASCII( |
| 114 switches::kUseFakeDeviceForMediaStream, |
| 115 "device-count=2"); // A color and a 16-bit depth device. |
| 114 return true; | 116 return true; |
| 115 } | 117 } |
| 116 | 118 |
| 117 protected: | 119 protected: |
| 118 ContentMainDelegate* CreateContentMainDelegate() override { | 120 ContentMainDelegate* CreateContentMainDelegate() override { |
| 119 return new ShellMainDelegate(); | 121 return new ShellMainDelegate(); |
| 120 } | 122 } |
| 121 | 123 |
| 122 private: | 124 private: |
| 123 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); | 125 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace content | 128 } // namespace content |
| 127 | 129 |
| 128 int main(int argc, char** argv) { | 130 int main(int argc, char** argv) { |
| 129 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); | 131 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); |
| 130 content::ContentTestLauncherDelegate launcher_delegate; | 132 content::ContentTestLauncherDelegate launcher_delegate; |
| 131 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); | 133 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); |
| 132 } | 134 } |
| OLD | NEW |