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 <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // wrapping a lower-level test launcher with content-specific code. | 112 // wrapping a lower-level test launcher with content-specific code. |
113 class WrapperTestLauncherDelegate : public base::TestLauncherDelegate { | 113 class WrapperTestLauncherDelegate : public base::TestLauncherDelegate { |
114 public: | 114 public: |
115 explicit WrapperTestLauncherDelegate( | 115 explicit WrapperTestLauncherDelegate( |
116 content::TestLauncherDelegate* launcher_delegate) | 116 content::TestLauncherDelegate* launcher_delegate) |
117 : launcher_delegate_(launcher_delegate) { | 117 : launcher_delegate_(launcher_delegate) { |
118 CHECK(temp_dir_.CreateUniqueTempDir()); | 118 CHECK(temp_dir_.CreateUniqueTempDir()); |
119 } | 119 } |
120 | 120 |
121 // base::TestLauncherDelegate: | 121 // base::TestLauncherDelegate: |
122 virtual bool ShouldRunTest(const testing::TestCase* test_case, | 122 bool ShouldRunTest(const testing::TestCase* test_case, |
123 const testing::TestInfo* test_info) override; | 123 const testing::TestInfo* test_info) override; |
124 virtual size_t RunTests(base::TestLauncher* test_launcher, | 124 size_t RunTests(base::TestLauncher* test_launcher, |
125 const std::vector<std::string>& test_names) override; | 125 const std::vector<std::string>& test_names) override; |
126 virtual size_t RetryTests( | 126 size_t RetryTests(base::TestLauncher* test_launcher, |
127 base::TestLauncher* test_launcher, | 127 const std::vector<std::string>& test_names) override; |
128 const std::vector<std::string>& test_names) override; | |
129 | 128 |
130 private: | 129 private: |
131 void DoRunTest(base::TestLauncher* test_launcher, | 130 void DoRunTest(base::TestLauncher* test_launcher, |
132 const std::string& test_name); | 131 const std::string& test_name); |
133 | 132 |
134 // Launches test named |test_name| using parallel launcher, | 133 // Launches test named |test_name| using parallel launcher, |
135 // given result of PRE_ test |pre_test_result|. | 134 // given result of PRE_ test |pre_test_result|. |
136 void RunDependentTest(base::TestLauncher* test_launcher, | 135 void RunDependentTest(base::TestLauncher* test_launcher, |
137 const std::string test_name, | 136 const std::string test_name, |
138 const base::TestResult& pre_test_result); | 137 const base::TestResult& pre_test_result); |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 | 499 |
501 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { | 500 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { |
502 return g_launcher_delegate; | 501 return g_launcher_delegate; |
503 } | 502 } |
504 | 503 |
505 ContentMainParams* GetContentMainParams() { | 504 ContentMainParams* GetContentMainParams() { |
506 return g_params; | 505 return g_params; |
507 } | 506 } |
508 | 507 |
509 } // namespace content | 508 } // namespace content |
OLD | NEW |