OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 /* | 5 /* |
6 LayoutTestController class: | 6 LayoutTestController class: |
7 Bound to a JavaScript window.layoutTestController object using the | 7 Bound to a JavaScript window.layoutTestController object using the |
8 CppBoundClass::BindToJavascript(), this allows layout tests that are run in | 8 CppBoundClass::BindToJavascript(), this allows layout tests that are run in |
9 the test_shell (or, in principle, any web page loaded into a client app built | 9 the test_shell (or, in principle, any web page loaded into a client app built |
10 with this class) to control various aspects of how the tests are run and what | 10 with this class) to control various aspects of how the tests are run and what |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // Puts Webkit in "dashboard compatibility mode", which is used in obscure | 103 // Puts Webkit in "dashboard compatibility mode", which is used in obscure |
104 // Mac-only circumstances. It's not really necessary, and will most likely | 104 // Mac-only circumstances. It's not really necessary, and will most likely |
105 // never be used by Chrome, but some layout tests depend on its presence. | 105 // never be used by Chrome, but some layout tests depend on its presence. |
106 void setUseDashboardCompatibilityMode(const CppArgumentList& args, CppVariant*
result); | 106 void setUseDashboardCompatibilityMode(const CppArgumentList& args, CppVariant*
result); |
107 | 107 |
108 // Causes navigation actions just printout the intended navigation instead | 108 // Causes navigation actions just printout the intended navigation instead |
109 // of taking you to the page. This is used for cases like mailto, where you | 109 // of taking you to the page. This is used for cases like mailto, where you |
110 // don't actually want to open the mail program. | 110 // don't actually want to open the mail program. |
111 void setCustomPolicyDelegate(const CppArgumentList& args, CppVariant* result); | 111 void setCustomPolicyDelegate(const CppArgumentList& args, CppVariant* result); |
112 | 112 |
| 113 // Delays completion of the test until the policy delegate runs. |
| 114 void waitForPolicyDelegate(const CppArgumentList& args, CppVariant* result); |
| 115 |
113 // Converts a URL starting with file:///tmp/ to the local mapping. | 116 // Converts a URL starting with file:///tmp/ to the local mapping. |
114 void pathToLocalResource(const CppArgumentList& args, CppVariant* result); | 117 void pathToLocalResource(const CppArgumentList& args, CppVariant* result); |
115 | 118 |
116 // Sets a bool such that when a drag is started, we fill the drag clipboard | 119 // Sets a bool such that when a drag is started, we fill the drag clipboard |
117 // with a fake file object. | 120 // with a fake file object. |
118 void addFileToPasteboardOnDrag(const CppArgumentList& args, CppVariant* result
); | 121 void addFileToPasteboardOnDrag(const CppArgumentList& args, CppVariant* result
); |
119 | 122 |
120 // Executes an internal command (superset of document.execCommand() commands). | 123 // Executes an internal command (superset of document.execCommand() commands). |
121 void execCommand(const CppArgumentList& args, CppVariant* result); | 124 void execCommand(const CppArgumentList& args, CppVariant* result); |
122 | 125 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 return dump_child_frames_as_text_; | 202 return dump_child_frames_as_text_; |
200 } | 203 } |
201 bool AcceptsEditing() { return accepts_editing_; } | 204 bool AcceptsEditing() { return accepts_editing_; } |
202 bool CanOpenWindows() { return can_open_windows_; } | 205 bool CanOpenWindows() { return can_open_windows_; } |
203 bool ShouldAddFileToPasteboard() { return should_add_file_to_pasteboard_; } | 206 bool ShouldAddFileToPasteboard() { return should_add_file_to_pasteboard_; } |
204 bool StopProvisionalFrameLoads() { return stop_provisional_frame_loads_; } | 207 bool StopProvisionalFrameLoads() { return stop_provisional_frame_loads_; } |
205 | 208 |
206 // Called by the webview delegate when the toplevel frame load is done. | 209 // Called by the webview delegate when the toplevel frame load is done. |
207 void LocationChangeDone(); | 210 void LocationChangeDone(); |
208 | 211 |
| 212 // Called by the webview delegate when the policy delegate runs if the |
| 213 // waitForPolicyDelegate was called. |
| 214 void PolicyDelegateDone(); |
| 215 |
209 // Reinitializes all static values. The Reset() method should be called | 216 // Reinitializes all static values. The Reset() method should be called |
210 // before the start of each test (currently from | 217 // before the start of each test (currently from |
211 // TestShell::RunFileTest). | 218 // TestShell::RunFileTest). |
212 void Reset(); | 219 void Reset(); |
213 | 220 |
214 // A single item in the work queue. | 221 // A single item in the work queue. |
215 class WorkItem { | 222 class WorkItem { |
216 public: | 223 public: |
217 virtual ~WorkItem() {} | 224 virtual ~WorkItem() {} |
218 | 225 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 325 |
319 static WorkQueue work_queue_; | 326 static WorkQueue work_queue_; |
320 | 327 |
321 static CppVariant globalFlag_; | 328 static CppVariant globalFlag_; |
322 | 329 |
323 // Bound variable counting the number of top URLs visited. | 330 // Bound variable counting the number of top URLs visited. |
324 static CppVariant webHistoryItemCount_; | 331 static CppVariant webHistoryItemCount_; |
325 }; | 332 }; |
326 | 333 |
327 #endif // WEBKIT_TOOLS_TEST_SHELL_LAYOUT_TEST_CONTROLLER_H_ | 334 #endif // WEBKIT_TOOLS_TEST_SHELL_LAYOUT_TEST_CONTROLLER_H_ |
OLD | NEW |