| 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 <ostream> | 9 #include <ostream> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 private: | 180 private: |
| 181 enum TestPhase { | 181 enum TestPhase { |
| 182 BETWEEN_TESTS, | 182 BETWEEN_TESTS, |
| 183 DURING_TEST, | 183 DURING_TEST, |
| 184 CLEAN_UP | 184 CLEAN_UP |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 static BlinkTestController* instance_; | 187 static BlinkTestController* instance_; |
| 188 | 188 |
| 189 void DiscardMainWindow(); | 189 void DiscardMainWindow(); |
| 190 void SendTestConfiguration(); | 190 void HandleNewRenderFrameHost( |
| 191 RenderFrameHost* frame_representing_target_process); |
| 191 | 192 |
| 192 // Message handlers. | 193 // Message handlers. |
| 193 void OnAudioDump(const std::vector<unsigned char>& audio_dump); | 194 void OnAudioDump(const std::vector<unsigned char>& audio_dump); |
| 194 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image); | 195 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image); |
| 195 void OnTextDump(const std::string& dump); | 196 void OnTextDump(const std::string& dump); |
| 196 void OnInitiateLayoutDump( | 197 void OnInitiateLayoutDump( |
| 197 const test_runner::LayoutDumpFlags& layout_dump_flags); | 198 const test_runner::LayoutDumpFlags& layout_dump_flags); |
| 198 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); | 199 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); |
| 199 void OnPrintMessage(const std::string& message); | 200 void OnPrintMessage(const std::string& message); |
| 200 void OnOverridePreferences(const WebPreferences& prefs); | 201 void OnOverridePreferences(const WebPreferences& prefs); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 218 scoped_ptr<BlinkTestResultPrinter> printer_; | 219 scoped_ptr<BlinkTestResultPrinter> printer_; |
| 219 | 220 |
| 220 base::FilePath current_working_directory_; | 221 base::FilePath current_working_directory_; |
| 221 base::FilePath temp_path_; | 222 base::FilePath temp_path_; |
| 222 | 223 |
| 223 Shell* main_window_; | 224 Shell* main_window_; |
| 224 | 225 |
| 225 // The PID of the render process of the render view host of main_window_. | 226 // The PID of the render process of the render view host of main_window_. |
| 226 int current_pid_; | 227 int current_pid_; |
| 227 | 228 |
| 228 // True if we should set the test configuration to the next RenderViewHost | 229 // Tracks if (during the current test) we have already sent *initial* test |
| 229 // created. | 230 // configuration to a renderer process (*initial* test configuration is |
| 230 bool send_configuration_to_next_host_; | 231 // associated with some steps that should only be executed *once* per test - |
| 232 // for example resizing the window and setting the focus). |
| 233 bool did_send_initial_test_configuration_; |
| 231 | 234 |
| 232 // What phase of running an individual test we are currently in. | 235 // What phase of running an individual test we are currently in. |
| 233 TestPhase test_phase_; | 236 TestPhase test_phase_; |
| 234 | 237 |
| 235 // True if the currently running test is a compositing test. | 238 // True if the currently running test is a compositing test. |
| 236 bool is_compositing_test_; | 239 bool is_compositing_test_; |
| 237 | 240 |
| 238 // Per test config. | 241 // Per test config. |
| 239 bool enable_pixel_dumping_; | 242 bool enable_pixel_dumping_; |
| 240 std::string expected_pixel_hash_; | 243 std::string expected_pixel_hash_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 269 // waiting on the UI thread while layout tests are being ran. | 272 // waiting on the UI thread while layout tests are being ran. |
| 270 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; | 273 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; |
| 271 #endif | 274 #endif |
| 272 | 275 |
| 273 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); | 276 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); |
| 274 }; | 277 }; |
| 275 | 278 |
| 276 } // namespace content | 279 } // namespace content |
| 277 | 280 |
| 278 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 281 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
| OLD | NEW |