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 25 matching lines...) Expand all Loading... |
126 void OnGoToOffset(int offset); | 128 void OnGoToOffset(int offset); |
127 void OnReload(); | 129 void OnReload(); |
128 void OnLoadURLForFrame(const GURL& url, const std::string& frame_name); | 130 void OnLoadURLForFrame(const GURL& url, const std::string& frame_name); |
129 | 131 |
130 void OnNotImplemented(const std::string& object_name, | 132 void OnNotImplemented(const std::string& object_name, |
131 const std::string& method_name); | 133 const std::string& method_name); |
132 | 134 |
133 scoped_ptr<WebKitTestResultPrinter> printer_; | 135 scoped_ptr<WebKitTestResultPrinter> printer_; |
134 | 136 |
135 base::FilePath current_working_directory_; | 137 base::FilePath current_working_directory_; |
| 138 base::FilePath temp_path_; |
136 | 139 |
137 Shell* main_window_; | 140 Shell* main_window_; |
138 | 141 |
139 int current_pid_; | 142 int current_pid_; |
140 | 143 |
141 bool is_compositing_test_; | 144 bool is_compositing_test_; |
142 | 145 |
143 bool enable_pixel_dumping_; | 146 bool enable_pixel_dumping_; |
144 std::string expected_pixel_hash_; | 147 std::string expected_pixel_hash_; |
145 GURL test_url_; | 148 GURL test_url_; |
146 | 149 |
147 webkit_glue::WebPreferences prefs_; | 150 webkit_glue::WebPreferences prefs_; |
148 bool should_override_prefs_; | 151 bool should_override_prefs_; |
149 | 152 |
150 base::CancelableClosure watchdog_; | 153 base::CancelableClosure watchdog_; |
151 | 154 |
152 NotificationRegistrar registrar_; | 155 NotificationRegistrar registrar_; |
153 | 156 |
154 DISALLOW_COPY_AND_ASSIGN(WebKitTestController); | 157 DISALLOW_COPY_AND_ASSIGN(WebKitTestController); |
155 }; | 158 }; |
156 | 159 |
157 } // namespace content | 160 } // namespace content |
158 | 161 |
159 #endif // CONTENT_SHELL_WEBKIT_TEST_CONTROLLER_H_ | 162 #endif // CONTENT_SHELL_WEBKIT_TEST_CONTROLLER_H_ |
OLD | NEW |