OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <ostream> | 10 #include <ostream> |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 private: | 189 private: |
190 enum TestPhase { | 190 enum TestPhase { |
191 BETWEEN_TESTS, | 191 BETWEEN_TESTS, |
192 DURING_TEST, | 192 DURING_TEST, |
193 CLEAN_UP | 193 CLEAN_UP |
194 }; | 194 }; |
195 | 195 |
196 static BlinkTestController* instance_; | 196 static BlinkTestController* instance_; |
197 | 197 |
| 198 void LoadDevToolsJSTest(); |
198 void DiscardMainWindow(); | 199 void DiscardMainWindow(); |
199 | 200 |
200 // Message handlers. | 201 // Message handlers. |
201 void OnAudioDump(const std::vector<unsigned char>& audio_dump); | 202 void OnAudioDump(const std::vector<unsigned char>& audio_dump); |
202 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image); | 203 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image); |
203 void OnTextDump(const std::string& dump); | 204 void OnTextDump(const std::string& dump); |
204 void OnInitiateLayoutDump(); | 205 void OnInitiateLayoutDump(); |
205 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); | 206 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); |
206 void OnPrintMessageToStderr(const std::string& message); | 207 void OnPrintMessageToStderr(const std::string& message); |
207 void OnPrintMessage(const std::string& message); | 208 void OnPrintMessage(const std::string& message); |
(...skipping 17 matching lines...) Expand all Loading... |
225 const std::string& argument); | 226 const std::string& argument); |
226 mojom::LayoutTestControl* GetLayoutTestControlPtr(RenderFrameHost* frame); | 227 mojom::LayoutTestControl* GetLayoutTestControlPtr(RenderFrameHost* frame); |
227 void HandleLayoutTestControlError(RenderFrameHost* frame); | 228 void HandleLayoutTestControlError(RenderFrameHost* frame); |
228 | 229 |
229 std::unique_ptr<BlinkTestResultPrinter> printer_; | 230 std::unique_ptr<BlinkTestResultPrinter> printer_; |
230 | 231 |
231 base::FilePath current_working_directory_; | 232 base::FilePath current_working_directory_; |
232 base::FilePath temp_path_; | 233 base::FilePath temp_path_; |
233 | 234 |
234 Shell* main_window_; | 235 Shell* main_window_; |
| 236 Shell* secondary_window_; |
235 Shell* devtools_window_; | 237 Shell* devtools_window_; |
236 | 238 |
237 std::unique_ptr<LayoutTestDevToolsBindings> devtools_bindings_; | 239 std::unique_ptr<LayoutTestDevToolsBindings> devtools_bindings_; |
238 | 240 |
239 // The PID of the render process of the render view host of main_window_. | 241 // The PID of the render process of the render view host of main_window_. |
240 int current_pid_; | 242 int current_pid_; |
241 | 243 |
242 // Tracks if (during the current test) we have already sent *initial* test | 244 // Tracks if (during the current test) we have already sent *initial* test |
243 // configuration to a renderer process (*initial* test configuration is | 245 // configuration to a renderer process (*initial* test configuration is |
244 // associated with some steps that should only be executed *once* per test - | 246 // associated with some steps that should only be executed *once* per test - |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 // waiting on the UI thread while layout tests are being ran. | 299 // waiting on the UI thread while layout tests are being ran. |
298 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; | 300 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; |
299 #endif | 301 #endif |
300 | 302 |
301 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); | 303 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); |
302 }; | 304 }; |
303 | 305 |
304 } // namespace content | 306 } // namespace content |
305 | 307 |
306 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 308 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
OLD | NEW |