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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 const base::FilePath& current_working_directory, | 131 const base::FilePath& current_working_directory, |
132 bool enable_pixel_dumping, | 132 bool enable_pixel_dumping, |
133 const std::string& expected_pixel_hash); | 133 const std::string& expected_pixel_hash); |
134 // True if the controller was reset successfully. | 134 // True if the controller was reset successfully. |
135 bool ResetAfterLayoutTest(); | 135 bool ResetAfterLayoutTest(); |
136 | 136 |
137 // IPC messages forwarded from elsewhere. | 137 // IPC messages forwarded from elsewhere. |
138 void OnLayoutTestRuntimeFlagsChanged( | 138 void OnLayoutTestRuntimeFlagsChanged( |
139 int sender_process_host_id, | 139 int sender_process_host_id, |
140 const base::DictionaryValue& changed_layout_test_runtime_flags); | 140 const base::DictionaryValue& changed_layout_test_runtime_flags); |
| 141 void OnPrintMessage(const std::string& message); |
141 void OnTestFinishedInSecondaryRenderer(); | 142 void OnTestFinishedInSecondaryRenderer(); |
142 | 143 |
143 // Makes sure that the potentially new renderer associated with |frame| is 1) | 144 // Makes sure that the potentially new renderer associated with |frame| is 1) |
144 // initialized for the test, 2) kept up to date wrt test flags and 3) | 145 // initialized for the test, 2) kept up to date wrt test flags and 3) |
145 // monitored for crashes. | 146 // monitored for crashes. |
146 void HandleNewRenderFrameHost(RenderFrameHost* frame); | 147 void HandleNewRenderFrameHost(RenderFrameHost* frame); |
147 | 148 |
148 void SetTempPath(const base::FilePath& temp_path); | 149 void SetTempPath(const base::FilePath& temp_path); |
149 void RendererUnresponsive(); | 150 void RendererUnresponsive(); |
150 void OverrideWebkitPrefs(WebPreferences* prefs); | 151 void OverrideWebkitPrefs(WebPreferences* prefs); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 static BlinkTestController* instance_; | 194 static BlinkTestController* instance_; |
194 | 195 |
195 void DiscardMainWindow(); | 196 void DiscardMainWindow(); |
196 | 197 |
197 // Message handlers. | 198 // Message handlers. |
198 void OnAudioDump(const std::vector<unsigned char>& audio_dump); | 199 void OnAudioDump(const std::vector<unsigned char>& audio_dump); |
199 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image); | 200 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image); |
200 void OnTextDump(const std::string& dump); | 201 void OnTextDump(const std::string& dump); |
201 void OnInitiateLayoutDump(); | 202 void OnInitiateLayoutDump(); |
202 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); | 203 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); |
203 void OnPrintMessage(const std::string& message); | |
204 void OnOverridePreferences(const WebPreferences& prefs); | 204 void OnOverridePreferences(const WebPreferences& prefs); |
205 void OnTestFinished(); | 205 void OnTestFinished(); |
206 void OnClearDevToolsLocalStorage(); | 206 void OnClearDevToolsLocalStorage(); |
207 void OnShowDevTools(const std::string& settings, | 207 void OnShowDevTools(const std::string& settings, |
208 const std::string& frontend_url); | 208 const std::string& frontend_url); |
209 void OnEvaluateInDevTools(int call_id, const std::string& script); | 209 void OnEvaluateInDevTools(int call_id, const std::string& script); |
210 void OnCloseDevTools(); | 210 void OnCloseDevTools(); |
211 void OnGoToOffset(int offset); | 211 void OnGoToOffset(int offset); |
212 void OnReload(); | 212 void OnReload(); |
213 void OnLoadURLForFrame(const GURL& url, const std::string& frame_name); | 213 void OnLoadURLForFrame(const GURL& url, const std::string& frame_name); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 // waiting on the UI thread while layout tests are being ran. | 287 // waiting on the UI thread while layout tests are being ran. |
288 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; | 288 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; |
289 #endif | 289 #endif |
290 | 290 |
291 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); | 291 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); |
292 }; | 292 }; |
293 | 293 |
294 } // namespace content | 294 } // namespace content |
295 | 295 |
296 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 296 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
OLD | NEW |