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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // The fallback method is called when a nonexistent method is called on | 190 // The fallback method is called when a nonexistent method is called on |
191 // the layout test controller object. | 191 // the layout test controller object. |
192 // It is usefull to catch typos in the JavaScript code (a few layout tests | 192 // It is usefull to catch typos in the JavaScript code (a few layout tests |
193 // do have typos in them) and it allows the script to continue running in | 193 // do have typos in them) and it allows the script to continue running in |
194 // that case (as the Mac does). | 194 // that case (as the Mac does). |
195 void fallbackMethod(const CppArgumentList& args, CppVariant* result); | 195 void fallbackMethod(const CppArgumentList& args, CppVariant* result); |
196 | 196 |
197 // Allows layout tests to call SecurityOrigin::whiteListAccessFromOrigin(). | 197 // Allows layout tests to call SecurityOrigin::whiteListAccessFromOrigin(). |
198 void whiteListAccessFromOrigin(const CppArgumentList& args, CppVariant* result
); | 198 void whiteListAccessFromOrigin(const CppArgumentList& args, CppVariant* result
); |
199 | 199 |
| 200 // Clears all databases. |
| 201 void clearAllDatabases(const CppArgumentList& args, CppVariant* result); |
| 202 |
200 public: | 203 public: |
201 // The following methods are not exposed to JavaScript. | 204 // The following methods are not exposed to JavaScript. |
202 void SetWorkQueueFrozen(bool frozen) { work_queue_.set_frozen(frozen); } | 205 void SetWorkQueueFrozen(bool frozen) { work_queue_.set_frozen(frozen); } |
203 | 206 |
204 bool ShouldDumpAsText() { return dump_as_text_; } | 207 bool ShouldDumpAsText() { return dump_as_text_; } |
205 bool ShouldDumpEditingCallbacks() { return dump_editing_callbacks_; } | 208 bool ShouldDumpEditingCallbacks() { return dump_editing_callbacks_; } |
206 bool ShouldDumpFrameLoadCallbacks() { return dump_frame_load_callbacks_; } | 209 bool ShouldDumpFrameLoadCallbacks() { return dump_frame_load_callbacks_; } |
207 void SetShouldDumpFrameLoadCallbacks(bool value) { | 210 void SetShouldDumpFrameLoadCallbacks(bool value) { |
208 dump_frame_load_callbacks_ = value; | 211 dump_frame_load_callbacks_ = value; |
209 } | 212 } |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 355 |
353 static WorkQueue work_queue_; | 356 static WorkQueue work_queue_; |
354 | 357 |
355 static CppVariant globalFlag_; | 358 static CppVariant globalFlag_; |
356 | 359 |
357 // Bound variable counting the number of top URLs visited. | 360 // Bound variable counting the number of top URLs visited. |
358 static CppVariant webHistoryItemCount_; | 361 static CppVariant webHistoryItemCount_; |
359 }; | 362 }; |
360 | 363 |
361 #endif // WEBKIT_TOOLS_TEST_SHELL_LAYOUT_TEST_CONTROLLER_H_ | 364 #endif // WEBKIT_TOOLS_TEST_SHELL_LAYOUT_TEST_CONTROLLER_H_ |
OLD | NEW |