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 /* | 5 /* |
6 * Copyright (C) 2010 Google Inc. All rights reserved. | 6 * Copyright (C) 2010 Google Inc. All rights reserved. |
7 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) | 7 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) |
8 * Copyright (C) 2012 Apple Inc. All Rights Reserved. | 8 * Copyright (C) 2012 Apple Inc. All Rights Reserved. |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 bindMethod("dumpSpellCheckCallbacks", &TestRunner::dumpSpellCheckCallbacks); | 273 bindMethod("dumpSpellCheckCallbacks", &TestRunner::dumpSpellCheckCallbacks); |
274 bindMethod("dumpBackForwardList", &TestRunner::dumpBackForwardList); | 274 bindMethod("dumpBackForwardList", &TestRunner::dumpBackForwardList); |
275 bindMethod("dumpSelectionRect", &TestRunner::dumpSelectionRect); | 275 bindMethod("dumpSelectionRect", &TestRunner::dumpSelectionRect); |
276 bindMethod("testRepaint", &TestRunner::testRepaint); | 276 bindMethod("testRepaint", &TestRunner::testRepaint); |
277 bindMethod("repaintSweepHorizontally", &TestRunner::repaintSweepHorizontally
); | 277 bindMethod("repaintSweepHorizontally", &TestRunner::repaintSweepHorizontally
); |
278 bindMethod("setPrinting", &TestRunner::setPrinting); | 278 bindMethod("setPrinting", &TestRunner::setPrinting); |
279 bindMethod("setShouldStayOnPageAfterHandlingBeforeUnload", &TestRunner::setS
houldStayOnPageAfterHandlingBeforeUnload); | 279 bindMethod("setShouldStayOnPageAfterHandlingBeforeUnload", &TestRunner::setS
houldStayOnPageAfterHandlingBeforeUnload); |
280 bindMethod("setWillSendRequestClearHeader", &TestRunner::setWillSendRequestC
learHeader); | 280 bindMethod("setWillSendRequestClearHeader", &TestRunner::setWillSendRequestC
learHeader); |
281 bindMethod("dumpResourceRequestPriorities", &TestRunner::dumpResourceRequest
Priorities); | 281 bindMethod("dumpResourceRequestPriorities", &TestRunner::dumpResourceRequest
Priorities); |
282 bindMethod("setUseMockTheme", &TestRunner::setUseMockTheme); | 282 bindMethod("setUseMockTheme", &TestRunner::setUseMockTheme); |
| 283 bindMethod("waitUntilExternalURLLoad", &TestRunner::waitUntilExternalURLLoad
); |
283 | 284 |
284 // The following methods interact with the WebTestProxy. | 285 // The following methods interact with the WebTestProxy. |
285 // The following methods interact with the WebTestDelegate. | 286 // The following methods interact with the WebTestDelegate. |
286 bindMethod("showWebInspector", &TestRunner::showWebInspector); | 287 bindMethod("showWebInspector", &TestRunner::showWebInspector); |
287 bindMethod("closeWebInspector", &TestRunner::closeWebInspector); | 288 bindMethod("closeWebInspector", &TestRunner::closeWebInspector); |
288 bindMethod("evaluateInWebInspector", &TestRunner::evaluateInWebInspector); | 289 bindMethod("evaluateInWebInspector", &TestRunner::evaluateInWebInspector); |
289 bindMethod("clearAllDatabases", &TestRunner::clearAllDatabases); | 290 bindMethod("clearAllDatabases", &TestRunner::clearAllDatabases); |
290 bindMethod("setDatabaseQuota", &TestRunner::setDatabaseQuota); | 291 bindMethod("setDatabaseQuota", &TestRunner::setDatabaseQuota); |
291 bindMethod("setAlwaysAcceptCookies", &TestRunner::setAlwaysAcceptCookies); | 292 bindMethod("setAlwaysAcceptCookies", &TestRunner::setAlwaysAcceptCookies); |
292 bindMethod("setWindowIsKey", &TestRunner::setWindowIsKey); | 293 bindMethod("setWindowIsKey", &TestRunner::setWindowIsKey); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 m_dumpProgressFinishedCallback = false; | 433 m_dumpProgressFinishedCallback = false; |
433 m_dumpSpellCheckCallbacks = false; | 434 m_dumpSpellCheckCallbacks = false; |
434 m_dumpBackForwardList = false; | 435 m_dumpBackForwardList = false; |
435 m_dumpSelectionRect = false; | 436 m_dumpSelectionRect = false; |
436 m_testRepaint = false; | 437 m_testRepaint = false; |
437 m_sweepHorizontally = false; | 438 m_sweepHorizontally = false; |
438 m_isPrinting = false; | 439 m_isPrinting = false; |
439 m_midiAccessorResult = true; | 440 m_midiAccessorResult = true; |
440 m_shouldStayOnPageAfterHandlingBeforeUnload = false; | 441 m_shouldStayOnPageAfterHandlingBeforeUnload = false; |
441 m_shouldDumpResourcePriorities = false; | 442 m_shouldDumpResourcePriorities = false; |
| 443 m_shouldWaitUntilExternalURLLoad = false; |
442 | 444 |
443 m_httpHeadersToClear.clear(); | 445 m_httpHeadersToClear.clear(); |
444 | 446 |
445 m_globalFlag.set(false); | 447 m_globalFlag.set(false); |
446 m_webHistoryItemCount.set(0); | 448 m_webHistoryItemCount.set(0); |
447 m_interceptPostMessage.set(false); | 449 m_interceptPostMessage.set(false); |
448 m_platformName.set("chromium"); | 450 m_platformName.set("chromium"); |
449 m_tooltipText.set(""); | 451 m_tooltipText.set(""); |
450 m_disableNotifyDone.set(false); | 452 m_disableNotifyDone.set(false); |
451 | 453 |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 bool TestRunner::shouldInterceptPostMessage() const | 706 bool TestRunner::shouldInterceptPostMessage() const |
705 { | 707 { |
706 return m_interceptPostMessage.isBool() && m_interceptPostMessage.toBoolean()
; | 708 return m_interceptPostMessage.isBool() && m_interceptPostMessage.toBoolean()
; |
707 } | 709 } |
708 | 710 |
709 bool TestRunner::shouldDumpResourcePriorities() const | 711 bool TestRunner::shouldDumpResourcePriorities() const |
710 { | 712 { |
711 return m_shouldDumpResourcePriorities; | 713 return m_shouldDumpResourcePriorities; |
712 } | 714 } |
713 | 715 |
| 716 bool TestRunner::shouldWaitUntilExternURLLoad() const |
| 717 { |
| 718 return m_shouldWaitUntilExternalURLLoad; |
| 719 } |
| 720 |
714 WebNotificationPresenter* TestRunner::notification_presenter() const | 721 WebNotificationPresenter* TestRunner::notification_presenter() const |
715 { | 722 { |
716 return notification_presenter_.get(); | 723 return notification_presenter_.get(); |
717 } | 724 } |
718 | 725 |
719 bool TestRunner::requestPointerLock() | 726 bool TestRunner::requestPointerLock() |
720 { | 727 { |
721 switch (m_pointerLockPlannedResult) { | 728 switch (m_pointerLockPlannedResult) { |
722 case PointerLockWillSucceed: | 729 case PointerLockWillSucceed: |
723 m_delegate->postDelayedTask(new HostMethodTask(this, &TestRunner::didAcq
uirePointerLockInternal), 0); | 730 m_delegate->postDelayedTask(new HostMethodTask(this, &TestRunner::didAcq
uirePointerLockInternal), 0); |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 m_shouldDumpResourcePriorities = true; | 1487 m_shouldDumpResourcePriorities = true; |
1481 result->setNull(); | 1488 result->setNull(); |
1482 } | 1489 } |
1483 | 1490 |
1484 void TestRunner::setUseMockTheme(const CppArgumentList& arguments, CppVariant* r
esult) | 1491 void TestRunner::setUseMockTheme(const CppArgumentList& arguments, CppVariant* r
esult) |
1485 { | 1492 { |
1486 result->setNull(); | 1493 result->setNull(); |
1487 m_useMockTheme = arguments.size() < 1 || arguments[0].toBoolean(); | 1494 m_useMockTheme = arguments.size() < 1 || arguments[0].toBoolean(); |
1488 } | 1495 } |
1489 | 1496 |
| 1497 void TestRunner::waitUntilExternalURLLoad(const CppArgumentList& arguments, CppV
ariant* result) |
| 1498 { |
| 1499 result->setNull(); |
| 1500 m_shouldWaitUntilExternalURLLoad = true; |
| 1501 } |
| 1502 |
1490 void TestRunner::useUnfortunateSynchronousResizeMode(const CppArgumentList& argu
ments, CppVariant* result) | 1503 void TestRunner::useUnfortunateSynchronousResizeMode(const CppArgumentList& argu
ments, CppVariant* result) |
1491 { | 1504 { |
1492 result->setNull(); | 1505 result->setNull(); |
1493 m_delegate->useUnfortunateSynchronousResizeMode(true); | 1506 m_delegate->useUnfortunateSynchronousResizeMode(true); |
1494 } | 1507 } |
1495 | 1508 |
1496 void TestRunner::enableAutoResizeMode(const CppArgumentList& arguments, CppVaria
nt* result) | 1509 void TestRunner::enableAutoResizeMode(const CppArgumentList& arguments, CppVaria
nt* result) |
1497 { | 1510 { |
1498 if (arguments.size() != 4) { | 1511 if (arguments.size() != 4) { |
1499 result->set(false); | 1512 result->set(false); |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2116 result->setNull(); | 2129 result->setNull(); |
2117 } | 2130 } |
2118 | 2131 |
2119 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp
Variant* result) | 2132 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp
Variant* result) |
2120 { | 2133 { |
2121 m_pointerLockPlannedResult = PointerLockWillFailSync; | 2134 m_pointerLockPlannedResult = PointerLockWillFailSync; |
2122 result->setNull(); | 2135 result->setNull(); |
2123 } | 2136 } |
2124 | 2137 |
2125 } | 2138 } |
OLD | NEW |