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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(ContentBrowserTestSuite); | 97 DISALLOW_COPY_AND_ASSIGN(ContentBrowserTestSuite); |
98 }; | 98 }; |
99 | 99 |
100 class ContentTestLauncherDelegate : public TestLauncherDelegate { | 100 class ContentTestLauncherDelegate : public TestLauncherDelegate { |
101 public: | 101 public: |
102 ContentTestLauncherDelegate() {} | 102 ContentTestLauncherDelegate() {} |
103 virtual ~ContentTestLauncherDelegate() {} | 103 virtual ~ContentTestLauncherDelegate() {} |
104 | 104 |
105 virtual std::string GetEmptyTestName() OVERRIDE { | |
106 return std::string(); | |
107 } | |
108 | |
109 virtual int RunTestSuite(int argc, char** argv) OVERRIDE { | 105 virtual int RunTestSuite(int argc, char** argv) OVERRIDE { |
110 return ContentBrowserTestSuite(argc, argv).Run(); | 106 return ContentBrowserTestSuite(argc, argv).Run(); |
111 } | 107 } |
112 | 108 |
113 virtual bool AdjustChildProcessCommandLine( | 109 virtual bool AdjustChildProcessCommandLine( |
114 CommandLine* command_line, const base::FilePath& temp_data_dir) OVERRIDE { | 110 CommandLine* command_line, const base::FilePath& temp_data_dir) OVERRIDE { |
115 command_line->AppendSwitchPath(switches::kContentShellDataPath, | 111 command_line->AppendSwitchPath(switches::kContentShellDataPath, |
116 temp_data_dir); | 112 temp_data_dir); |
117 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); | 113 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); |
118 return true; | 114 return true; |
119 } | 115 } |
120 | 116 |
121 protected: | 117 protected: |
122 virtual ContentMainDelegate* CreateContentMainDelegate() OVERRIDE { | 118 virtual ContentMainDelegate* CreateContentMainDelegate() OVERRIDE { |
123 return new ShellMainDelegate(); | 119 return new ShellMainDelegate(); |
124 } | 120 } |
125 | 121 |
126 private: | 122 private: |
127 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); | 123 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); |
128 }; | 124 }; |
129 | 125 |
130 } // namespace content | 126 } // namespace content |
131 | 127 |
132 int main(int argc, char** argv) { | 128 int main(int argc, char** argv) { |
133 content::ContentTestLauncherDelegate launcher_delegate; | 129 content::ContentTestLauncherDelegate launcher_delegate; |
134 return LaunchTests(&launcher_delegate, argc, argv); | 130 return LaunchTests(&launcher_delegate, argc, argv); |
135 } | 131 } |
OLD | NEW |