| 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 #ifndef CONTENT_SHELL_WEBKIT_TEST_CONTROLLER_H_ | 5 #ifndef CONTENT_SHELL_WEBKIT_TEST_CONTROLLER_H_ |
| 6 #define CONTENT_SHELL_WEBKIT_TEST_CONTROLLER_H_ | 6 #define CONTENT_SHELL_WEBKIT_TEST_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 virtual ~WebKitTestController(); | 81 virtual ~WebKitTestController(); |
| 82 | 82 |
| 83 // True if the controller is ready for testing. | 83 // True if the controller is ready for testing. |
| 84 bool PrepareForLayoutTest(const GURL& test_url, | 84 bool PrepareForLayoutTest(const GURL& test_url, |
| 85 const base::FilePath& current_working_directory, | 85 const base::FilePath& current_working_directory, |
| 86 bool enable_pixel_dumping, | 86 bool enable_pixel_dumping, |
| 87 const std::string& expected_pixel_hash); | 87 const std::string& expected_pixel_hash); |
| 88 // True if the controller was reset successfully. | 88 // True if the controller was reset successfully. |
| 89 bool ResetAfterLayoutTest(); | 89 bool ResetAfterLayoutTest(); |
| 90 | 90 |
| 91 void SetTempPath(const base::FilePath& temp_path); |
| 92 |
| 91 void RendererUnresponsive(); | 93 void RendererUnresponsive(); |
| 92 void OverrideWebkitPrefs(webkit_glue::WebPreferences* prefs); | 94 void OverrideWebkitPrefs(webkit_glue::WebPreferences* prefs); |
| 93 | 95 |
| 94 WebKitTestResultPrinter* printer() { return printer_.get(); } | 96 WebKitTestResultPrinter* printer() { return printer_.get(); } |
| 95 void set_printer(WebKitTestResultPrinter* printer) { | 97 void set_printer(WebKitTestResultPrinter* printer) { |
| 96 printer_.reset(printer); | 98 printer_.reset(printer); |
| 97 } | 99 } |
| 98 | 100 |
| 99 // WebContentsObserver implementation. | 101 // WebContentsObserver implementation. |
| 100 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 102 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 123 void OnTestFinished(bool did_timeout); | 125 void OnTestFinished(bool did_timeout); |
| 124 void OnShowDevTools(); | 126 void OnShowDevTools(); |
| 125 void OnCloseDevTools(); | 127 void OnCloseDevTools(); |
| 126 | 128 |
| 127 void OnNotImplemented(const std::string& object_name, | 129 void OnNotImplemented(const std::string& object_name, |
| 128 const std::string& method_name); | 130 const std::string& method_name); |
| 129 | 131 |
| 130 scoped_ptr<WebKitTestResultPrinter> printer_; | 132 scoped_ptr<WebKitTestResultPrinter> printer_; |
| 131 | 133 |
| 132 base::FilePath current_working_directory_; | 134 base::FilePath current_working_directory_; |
| 135 base::FilePath temp_path_; |
| 133 | 136 |
| 134 Shell* main_window_; | 137 Shell* main_window_; |
| 135 | 138 |
| 136 int current_pid_; | 139 int current_pid_; |
| 137 | 140 |
| 138 bool is_compositing_test_; | 141 bool is_compositing_test_; |
| 139 | 142 |
| 140 bool enable_pixel_dumping_; | 143 bool enable_pixel_dumping_; |
| 141 std::string expected_pixel_hash_; | 144 std::string expected_pixel_hash_; |
| 142 GURL test_url_; | 145 GURL test_url_; |
| 143 | 146 |
| 144 webkit_glue::WebPreferences prefs_; | 147 webkit_glue::WebPreferences prefs_; |
| 145 bool should_override_prefs_; | 148 bool should_override_prefs_; |
| 146 | 149 |
| 147 base::CancelableClosure watchdog_; | 150 base::CancelableClosure watchdog_; |
| 148 | 151 |
| 149 NotificationRegistrar registrar_; | 152 NotificationRegistrar registrar_; |
| 150 | 153 |
| 151 DISALLOW_COPY_AND_ASSIGN(WebKitTestController); | 154 DISALLOW_COPY_AND_ASSIGN(WebKitTestController); |
| 152 }; | 155 }; |
| 153 | 156 |
| 154 } // namespace content | 157 } // namespace content |
| 155 | 158 |
| 156 #endif // CONTENT_SHELL_WEBKIT_TEST_CONTROLLER_H_ | 159 #endif // CONTENT_SHELL_WEBKIT_TEST_CONTROLLER_H_ |
| OLD | NEW |