haikuwebkit/Tools/WebKitTestRunner/WorkQueueManager.cpp

232 lines
6.7 KiB
C++
Raw Permalink Normal View History

WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
/*
* Copyright (C) 2012 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "WorkQueueManager.h"
#include "PlatformWebView.h"
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
#include "StringFunctions.h"
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
#include "TestController.h"
[WK2] Change the remaining framework includes from WebKit2 to WebKit https://bugs.webkit.org/show_bug.cgi?id=132956 Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-16 Reviewed by Sam Weinig. Source/WebKit2: * NetworkProcess/unix/NetworkProcessMainUnix.cpp: * NetworkProcess/unix/NetworkProcessMainUnix.h: * PluginProcess/unix/PluginProcessMainUnix.h: * Shared/API/c/cairo/WKImageCairo.h: * Shared/API/c/cf/WKURLRequestCF.h: * Shared/API/c/cf/WKURLResponseCF.h: * Shared/API/c/efl/WKArrayEfl.cpp: * Shared/API/c/efl/WKArrayEfl.h: * UIProcess/API/C/CoordinatedGraphics/WKView.h: * UIProcess/API/C/WKBatteryManager.h: * UIProcess/API/C/WKBatteryStatus.h: * UIProcess/API/C/WKGrammarDetail.h: * UIProcess/API/C/WKTextChecker.h: * UIProcess/API/C/WKVibration.h: * UIProcess/API/C/WKViewportAttributes.h: * UIProcess/API/C/cairo/WKIconDatabaseCairo.h: * UIProcess/API/C/efl/WKAPICastEfl.h: * UIProcess/API/C/efl/WKColorPickerResultListener.h: * UIProcess/API/C/efl/WKEventEfl.h: * UIProcess/API/C/efl/WKPageEfl.h: * UIProcess/API/C/efl/WKPopupItem.h: * UIProcess/API/C/efl/WKPopupMenuListener.h: * UIProcess/API/C/efl/WKViewEfl.cpp: * UIProcess/API/C/efl/WKViewEfl.h: * UIProcess/API/C/gtk/WKFullScreenClientGtk.h: * UIProcess/API/C/gtk/WKInspectorClientGtk.h: * UIProcess/API/C/gtk/WKView.h: * UIProcess/API/C/gtk/WKViewPrivate.h: * UIProcess/API/C/soup/WKContextSoup.h: * UIProcess/API/C/soup/WKCookieManagerSoup.h: * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: * UIProcess/API/C/soup/WKSoupRequestManager.h: * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h: * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h: * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: * UIProcess/API/cpp/efl/WKEinaSharedString.h: * UIProcess/API/efl/EwkView.cpp: * UIProcess/API/efl/EwkView.h: * UIProcess/API/efl/EwkViewCallbacks.h: * UIProcess/API/efl/GestureRecognizer.h: * UIProcess/API/efl/ewk_application_cache_manager_private.h: * UIProcess/API/efl/ewk_auth_request_private.h: * UIProcess/API/efl/ewk_back_forward_list_item_private.h: * UIProcess/API/efl/ewk_back_forward_list_private.h: * UIProcess/API/efl/ewk_context_menu_item.cpp: * UIProcess/API/efl/ewk_context_private.h: * UIProcess/API/efl/ewk_cookie_manager_private.h: * UIProcess/API/efl/ewk_database_manager_private.h: * UIProcess/API/efl/ewk_error_private.h: * UIProcess/API/efl/ewk_favicon_database_private.h: * UIProcess/API/efl/ewk_file_chooser_request_private.h: * UIProcess/API/efl/ewk_page_group_private.h: * UIProcess/API/efl/ewk_popup_menu_item_private.h: * UIProcess/API/efl/ewk_popup_menu_private.h: * UIProcess/API/efl/ewk_security_origin_private.h: * UIProcess/API/efl/ewk_settings_private.h: * UIProcess/API/efl/ewk_storage_manager_private.h: * UIProcess/API/efl/ewk_view.cpp: * UIProcess/API/efl/ewk_view_private.h: * UIProcess/API/efl/ewk_window_features_private.h: * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: * UIProcess/API/gtk/WebKitDownloadClient.cpp: * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h: * UIProcess/efl/BatteryProvider.h: * UIProcess/efl/ContextHistoryClientEfl.h: * UIProcess/efl/DownloadManagerEfl.h: * UIProcess/efl/FindClientEfl.h: * UIProcess/efl/FormClientEfl.h: * UIProcess/efl/PageLoadClientEfl.h: * UIProcess/efl/PagePolicyClientEfl.h: * UIProcess/efl/PageUIClientEfl.h: * UIProcess/efl/RequestManagerClientEfl.h: * UIProcess/efl/TextCheckerClientEfl.h: * UIProcess/efl/VibrationClientEfl.h: * UIProcess/efl/ViewClientEfl.cpp: * UIProcess/efl/ViewClientEfl.h: * UIProcess/efl/WebInspectorProxyEfl.cpp: * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: * WebProcess/efl/SeccompFiltersWebProcessEfl.h: * WebProcess/efl/WebProcessMainEfl.cpp: * WebProcess/efl/WebProcessMainEfl.h: * WebProcess/gtk/WebGtkInjectedBundleMain.cpp: * WebProcess/gtk/WebProcessMainGtk.cpp: * WebProcess/gtk/WebProcessMainGtk.h: * mac/WKPreferences.h: Tools: * MiniBrowser/MiniBrowserWebProcessPlugIn.h: * MiniBrowser/mac/AppDelegate.m: * MiniBrowser/mac/WK2BrowserWindowController.m: * TestWebKitAPI/InjectedBundleController.h: * TestWebKitAPI/InjectedBundleMain.cpp: * TestWebKitAPI/JavaScriptTest.cpp: * TestWebKitAPI/PlatformUtilities.h: * TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm: * TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp: * TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/CookieManager.cpp: * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewIsActiveSetIsActive.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewIsActiveSetIsActive_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewRestoreZoomAndScrollBackForward.cpp: * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp: * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp: * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DidNotHandleKeyDown.cpp: * TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp: * TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp: * TestWebKitAPI/Tests/WebKit2/EphemeralSessionPushStateNoHistoryCallback.cpp: * TestWebKitAPI/Tests/WebKit2/EvaluateJavaScript.cpp: * TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp: * TestWebKitAPI/Tests/WebKit2/Find.cpp: * TestWebKitAPI/Tests/WebKit2/FindMatches.mm: * TestWebKitAPI/Tests/WebKit2/ForceRepaint.cpp: * TestWebKitAPI/Tests/WebKit2/FrameMIMETypeHTML.cpp: * TestWebKitAPI/Tests/WebKit2/FrameMIMETypePNG.cpp: * TestWebKitAPI/Tests/WebKit2/Geolocation.cpp: * TestWebKitAPI/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback.cpp: * TestWebKitAPI/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle.cpp: * TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/LayoutMilestonesWithAllContentInFrame.cpp: * TestWebKitAPI/Tests/WebKit2/LoadAlternateHTMLStringWithNonDirectoryURL.cpp: * TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback.cpp: * TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp: * TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp: * TestWebKitAPI/Tests/WebKit2/ParentFrame.cpp: * TestWebKitAPI/Tests/WebKit2/ParentFrame_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/PasteboardNotifications.mm: * TestWebKitAPI/Tests/WebKit2/PasteboardNotifications_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp: * TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp: * TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp: * TestWebKitAPI/Tests/WebKit2/ResizeReversePaginatedWebView.cpp: * TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp: * TestWebKitAPI/Tests/WebKit2/ScrollPinningBehaviors.cpp: * TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp: * TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp: * TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp: * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp: * TestWebKitAPI/Tests/WebKit2/WKStringJSString.cpp: * TestWebKitAPI/Tests/WebKit2/WebArchive.cpp: * TestWebKitAPI/Tests/WebKit2/WebArchive_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp: * TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/mac/EditorCommands.mm: * TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor.mm: * TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor_Bundle.mm: * TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp: * TestWebKitAPI/Tests/WebKit2/mac/WeakObjCPtr.mm: * TestWebKitAPI/Tests/WebKit2/win/AltKeyGeneratesWMSysCommand.cpp: * TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp: * TestWebKitAPI/Tests/WebKit2/win/ResizeViewWhileHidden.cpp: * TestWebKitAPI/Tests/WebKit2/win/TranslateMessageGeneratesWMChar.cpp: * TestWebKitAPI/Tests/WebKit2/win/WMCloseCallsUIClientClose.cpp: * TestWebKitAPI/Tests/WebKit2/win/WMPrint.cpp: * TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm: * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm: * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm: * TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm: * TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm: * TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextGroupTest.mm: * TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextLoadDelegateTest.mm: * TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm: * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: * TestWebKitAPI/config.h: * TestWebKitAPI/efl/PlatformWebView.cpp: * TestWebKitAPI/mac/JavaScriptTestMac.mm: * TestWebKitAPI/mac/PlatformUtilitiesMac.mm: * TestWebKitAPI/mac/PlatformWebViewMac.mm: * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h: * TestWebKitAPI/mac/WebKitAgnosticTest.mm: * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/GeolocationProviderMock.cpp: * WebKitTestRunner/GeolocationProviderMock.h: * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: * WebKitTestRunner/InjectedBundle/EventSendingController.h: * WebKitTestRunner/InjectedBundle/GCController.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/InjectedBundle/TextInputController.cpp: * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp: * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: * WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm: * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: * WebKitTestRunner/PlatformWebView.h: * WebKitTestRunner/StringFunctions.h: * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/WebKitTestRunnerPrefix.h: * WebKitTestRunner/WebNotificationProvider.cpp: * WebKitTestRunner/WebNotificationProvider.h: * WebKitTestRunner/WorkQueueManager.cpp: * WebKitTestRunner/cairo/TestInvocationCairo.cpp: * WebKitTestRunner/cg/TestInvocationCG.cpp: * WebKitTestRunner/cocoa/CrashReporterInfo.mm: * WebKitTestRunner/config.h: * WebKitTestRunner/efl/PlatformWebViewEfl.cpp: * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: * WebKitTestRunner/ios/PlatformWebViewIOS.mm: * WebKitTestRunner/ios/TestControllerIOS.mm: * WebKitTestRunner/mac/EventSenderProxy.mm: * WebKitTestRunner/mac/PlatformWebViewMac.mm: * WebKitTestRunner/mac/TestControllerMac.mm: Canonical link: https://commits.webkit.org/151031@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-05-16 08:53:19 +00:00
#include <WebKit/WKPage.h>
Add WKTR support for "should open external URLs". https://bugs.webkit.org/show_bug.cgi?id=145505 Reviewed by Darin Adler. Source/WebKit2: Expose C-spi to allow WKTR to set this bit on new loads: * UIProcess/API/C/WKPage.cpp: (WKPageLoadURLWithShouldOpenExternalURLsPolicy): * UIProcess/API/C/WKPagePrivate.h: Expose the bit on NavigationAction for the policy delegate: * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: (WKBundleNavigationActionGetShouldOpenExternalURLs): * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h. * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs): * WebKit2.xcodeproj/project.pbxproj: Tools: - Add a new option to "queueLoad" to allow javascript to queue a load that has the "should open external URLs" bit set. - Add a new "dumpPolicyDelegateCallbacks" call to dump the NavigationAction in the policy delegate, including whether or not the bit was set. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::dumpPolicyDelegateCallbacks): (WTR::TestRunner::shouldDumpPolicyCallbacks): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::decidePolicyForNavigationAction): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR::WorkQueueManager::queueLoad): * WebKitTestRunner/WorkQueueManager.h: LayoutTests: * loader/navigation-policy/resources/notify-done.html: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic.html: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic.html: Added. * platform/ios-simulator-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/163561@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-01 19:57:16 +00:00
#include <WebKit/WKPagePrivate.h>
[WK2] Change the remaining framework includes from WebKit2 to WebKit https://bugs.webkit.org/show_bug.cgi?id=132956 Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-16 Reviewed by Sam Weinig. Source/WebKit2: * NetworkProcess/unix/NetworkProcessMainUnix.cpp: * NetworkProcess/unix/NetworkProcessMainUnix.h: * PluginProcess/unix/PluginProcessMainUnix.h: * Shared/API/c/cairo/WKImageCairo.h: * Shared/API/c/cf/WKURLRequestCF.h: * Shared/API/c/cf/WKURLResponseCF.h: * Shared/API/c/efl/WKArrayEfl.cpp: * Shared/API/c/efl/WKArrayEfl.h: * UIProcess/API/C/CoordinatedGraphics/WKView.h: * UIProcess/API/C/WKBatteryManager.h: * UIProcess/API/C/WKBatteryStatus.h: * UIProcess/API/C/WKGrammarDetail.h: * UIProcess/API/C/WKTextChecker.h: * UIProcess/API/C/WKVibration.h: * UIProcess/API/C/WKViewportAttributes.h: * UIProcess/API/C/cairo/WKIconDatabaseCairo.h: * UIProcess/API/C/efl/WKAPICastEfl.h: * UIProcess/API/C/efl/WKColorPickerResultListener.h: * UIProcess/API/C/efl/WKEventEfl.h: * UIProcess/API/C/efl/WKPageEfl.h: * UIProcess/API/C/efl/WKPopupItem.h: * UIProcess/API/C/efl/WKPopupMenuListener.h: * UIProcess/API/C/efl/WKViewEfl.cpp: * UIProcess/API/C/efl/WKViewEfl.h: * UIProcess/API/C/gtk/WKFullScreenClientGtk.h: * UIProcess/API/C/gtk/WKInspectorClientGtk.h: * UIProcess/API/C/gtk/WKView.h: * UIProcess/API/C/gtk/WKViewPrivate.h: * UIProcess/API/C/soup/WKContextSoup.h: * UIProcess/API/C/soup/WKCookieManagerSoup.h: * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: * UIProcess/API/C/soup/WKSoupRequestManager.h: * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h: * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h: * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: * UIProcess/API/cpp/efl/WKEinaSharedString.h: * UIProcess/API/efl/EwkView.cpp: * UIProcess/API/efl/EwkView.h: * UIProcess/API/efl/EwkViewCallbacks.h: * UIProcess/API/efl/GestureRecognizer.h: * UIProcess/API/efl/ewk_application_cache_manager_private.h: * UIProcess/API/efl/ewk_auth_request_private.h: * UIProcess/API/efl/ewk_back_forward_list_item_private.h: * UIProcess/API/efl/ewk_back_forward_list_private.h: * UIProcess/API/efl/ewk_context_menu_item.cpp: * UIProcess/API/efl/ewk_context_private.h: * UIProcess/API/efl/ewk_cookie_manager_private.h: * UIProcess/API/efl/ewk_database_manager_private.h: * UIProcess/API/efl/ewk_error_private.h: * UIProcess/API/efl/ewk_favicon_database_private.h: * UIProcess/API/efl/ewk_file_chooser_request_private.h: * UIProcess/API/efl/ewk_page_group_private.h: * UIProcess/API/efl/ewk_popup_menu_item_private.h: * UIProcess/API/efl/ewk_popup_menu_private.h: * UIProcess/API/efl/ewk_security_origin_private.h: * UIProcess/API/efl/ewk_settings_private.h: * UIProcess/API/efl/ewk_storage_manager_private.h: * UIProcess/API/efl/ewk_view.cpp: * UIProcess/API/efl/ewk_view_private.h: * UIProcess/API/efl/ewk_window_features_private.h: * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: * UIProcess/API/gtk/WebKitDownloadClient.cpp: * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h: * UIProcess/efl/BatteryProvider.h: * UIProcess/efl/ContextHistoryClientEfl.h: * UIProcess/efl/DownloadManagerEfl.h: * UIProcess/efl/FindClientEfl.h: * UIProcess/efl/FormClientEfl.h: * UIProcess/efl/PageLoadClientEfl.h: * UIProcess/efl/PagePolicyClientEfl.h: * UIProcess/efl/PageUIClientEfl.h: * UIProcess/efl/RequestManagerClientEfl.h: * UIProcess/efl/TextCheckerClientEfl.h: * UIProcess/efl/VibrationClientEfl.h: * UIProcess/efl/ViewClientEfl.cpp: * UIProcess/efl/ViewClientEfl.h: * UIProcess/efl/WebInspectorProxyEfl.cpp: * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: * WebProcess/efl/SeccompFiltersWebProcessEfl.h: * WebProcess/efl/WebProcessMainEfl.cpp: * WebProcess/efl/WebProcessMainEfl.h: * WebProcess/gtk/WebGtkInjectedBundleMain.cpp: * WebProcess/gtk/WebProcessMainGtk.cpp: * WebProcess/gtk/WebProcessMainGtk.h: * mac/WKPreferences.h: Tools: * MiniBrowser/MiniBrowserWebProcessPlugIn.h: * MiniBrowser/mac/AppDelegate.m: * MiniBrowser/mac/WK2BrowserWindowController.m: * TestWebKitAPI/InjectedBundleController.h: * TestWebKitAPI/InjectedBundleMain.cpp: * TestWebKitAPI/JavaScriptTest.cpp: * TestWebKitAPI/PlatformUtilities.h: * TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm: * TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp: * TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/CookieManager.cpp: * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewIsActiveSetIsActive.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewIsActiveSetIsActive_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewRestoreZoomAndScrollBackForward.cpp: * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp: * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp: * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DidNotHandleKeyDown.cpp: * TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp: * TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp: * TestWebKitAPI/Tests/WebKit2/EphemeralSessionPushStateNoHistoryCallback.cpp: * TestWebKitAPI/Tests/WebKit2/EvaluateJavaScript.cpp: * TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp: * TestWebKitAPI/Tests/WebKit2/Find.cpp: * TestWebKitAPI/Tests/WebKit2/FindMatches.mm: * TestWebKitAPI/Tests/WebKit2/ForceRepaint.cpp: * TestWebKitAPI/Tests/WebKit2/FrameMIMETypeHTML.cpp: * TestWebKitAPI/Tests/WebKit2/FrameMIMETypePNG.cpp: * TestWebKitAPI/Tests/WebKit2/Geolocation.cpp: * TestWebKitAPI/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback.cpp: * TestWebKitAPI/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle.cpp: * TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/LayoutMilestonesWithAllContentInFrame.cpp: * TestWebKitAPI/Tests/WebKit2/LoadAlternateHTMLStringWithNonDirectoryURL.cpp: * TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback.cpp: * TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp: * TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp: * TestWebKitAPI/Tests/WebKit2/ParentFrame.cpp: * TestWebKitAPI/Tests/WebKit2/ParentFrame_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/PasteboardNotifications.mm: * TestWebKitAPI/Tests/WebKit2/PasteboardNotifications_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp: * TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp: * TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp: * TestWebKitAPI/Tests/WebKit2/ResizeReversePaginatedWebView.cpp: * TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp: * TestWebKitAPI/Tests/WebKit2/ScrollPinningBehaviors.cpp: * TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp: * TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp: * TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp: * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp: * TestWebKitAPI/Tests/WebKit2/WKStringJSString.cpp: * TestWebKitAPI/Tests/WebKit2/WebArchive.cpp: * TestWebKitAPI/Tests/WebKit2/WebArchive_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp: * TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/mac/EditorCommands.mm: * TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor.mm: * TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor_Bundle.mm: * TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp: * TestWebKitAPI/Tests/WebKit2/mac/WeakObjCPtr.mm: * TestWebKitAPI/Tests/WebKit2/win/AltKeyGeneratesWMSysCommand.cpp: * TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp: * TestWebKitAPI/Tests/WebKit2/win/ResizeViewWhileHidden.cpp: * TestWebKitAPI/Tests/WebKit2/win/TranslateMessageGeneratesWMChar.cpp: * TestWebKitAPI/Tests/WebKit2/win/WMCloseCallsUIClientClose.cpp: * TestWebKitAPI/Tests/WebKit2/win/WMPrint.cpp: * TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm: * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm: * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm: * TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm: * TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm: * TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextGroupTest.mm: * TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextLoadDelegateTest.mm: * TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm: * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: * TestWebKitAPI/config.h: * TestWebKitAPI/efl/PlatformWebView.cpp: * TestWebKitAPI/mac/JavaScriptTestMac.mm: * TestWebKitAPI/mac/PlatformUtilitiesMac.mm: * TestWebKitAPI/mac/PlatformWebViewMac.mm: * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h: * TestWebKitAPI/mac/WebKitAgnosticTest.mm: * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/GeolocationProviderMock.cpp: * WebKitTestRunner/GeolocationProviderMock.h: * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: * WebKitTestRunner/InjectedBundle/EventSendingController.h: * WebKitTestRunner/InjectedBundle/GCController.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/InjectedBundle/TextInputController.cpp: * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp: * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: * WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm: * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: * WebKitTestRunner/PlatformWebView.h: * WebKitTestRunner/StringFunctions.h: * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/WebKitTestRunnerPrefix.h: * WebKitTestRunner/WebNotificationProvider.cpp: * WebKitTestRunner/WebNotificationProvider.h: * WebKitTestRunner/WorkQueueManager.cpp: * WebKitTestRunner/cairo/TestInvocationCairo.cpp: * WebKitTestRunner/cg/TestInvocationCG.cpp: * WebKitTestRunner/cocoa/CrashReporterInfo.mm: * WebKitTestRunner/config.h: * WebKitTestRunner/efl/PlatformWebViewEfl.cpp: * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: * WebKitTestRunner/ios/PlatformWebViewIOS.mm: * WebKitTestRunner/ios/TestControllerIOS.mm: * WebKitTestRunner/mac/EventSenderProxy.mm: * WebKitTestRunner/mac/PlatformWebViewMac.mm: * WebKitTestRunner/mac/TestControllerMac.mm: Canonical link: https://commits.webkit.org/151031@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-05-16 08:53:19 +00:00
#include <WebKit/WKRetainPtr.h>
Remove unneeded headers from FrameLoader.h https://bugs.webkit.org/show_bug.cgi?id=114223 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Update for WTF changes. * bytecode/SpeculatedType.h: * runtime/JSCJSValue.h: Source/WebCore: Remove unneeded headers from FrameLoader.h and add them back into the respective .cpp files where needed. * dom/Document.cpp: * history/CachedFrame.cpp: * history/PageCache.cpp: * inspector/InspectorResourceAgent.cpp: * loader/DocumentLoader.cpp: * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad): * loader/FrameLoader.h: (WebCore): (WebCore::FrameLoader::policyChecker): (WebCore::FrameLoader::history): (WebCore::FrameLoader::icon): * loader/MixedContentChecker.h: * loader/icon/IconLoader.cpp: * page/History.cpp: * page/Page.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * testing/Internals.cpp: Source/WebKit/blackberry: Include HistoryController.h from WebCore. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: Source/WebKit/mac: Include HistoryController.h from WebCore. * WebCoreSupport/WebFrameLoaderClient.mm: * WebView/WebView.mm: Source/WebKit/win: Include HistoryController.h from WebCore. * WebView.cpp: Source/WebKit2: Include HistoryController.h from WebCore. * WebProcess/Plugins/PDF/SimplePDFPlugin.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebPage/WebPage.cpp: Source/WTF: * wtf/Forward.h: Add PrintStream. * wtf/HashTable.h: Don't include DataLog.h unless DUMP_HASHTABLE_STATS_PER_TABLE is 1. Tools: Add back headers implicitly included by other headers. * WebKitTestRunner/WorkQueueManager.cpp: Canonical link: https://commits.webkit.org/132740@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-04-10 19:11:20 +00:00
#include <stdio.h>
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
#include <wtf/text/CString.h>
namespace WTR {
static inline WKPageRef mainPage()
{
return TestController::singleton().mainWebView()->page();
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
}
static inline bool goToItemAtIndex(int index)
{
WKBackForwardListRef backForwardList = WKPageGetBackForwardList(mainPage());
ASSERT(backForwardList);
WKBackForwardListItemRef listItem = WKBackForwardListGetItemAtIndex(backForwardList, index);
if (!listItem)
return false;
WKPageGoToBackForwardListItem(mainPage(), listItem);
return true;
}
WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript https://bugs.webkit.org/show_bug.cgi?id=42675 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-22 Reviewed by Kenneth Rohde Christiansen. Tools: Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoadingScript): (WTR): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoadingScript): (WTR): (WTR::TestRunner::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR): (WTR::runJavaScriptFunction): (ScriptItem): (WTR::ScriptItem::ScriptItem): (WTR::ScriptItem::invoke): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::queueLoadingScript): (WTR::WorkQueueManager::queueNonLoadingScript): * WebKitTestRunner/WorkQueueManager.h: (WorkQueueManager): LayoutTests: Unskipped corresponding test cases for WK2. Put those which still fail to appropriate groups. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-22 08:42:08 +00:00
class WorkQueueItem {
public:
enum Type {
Loading,
NonLoading
};
virtual ~WorkQueueItem() { }
virtual Type invoke() const = 0;
};
// Required by WKPageRunJavaScriptInMainFrame().
static void runJavaScriptFunction(WKSerializedScriptValueRef, WKErrorRef, void*)
{
}
template <WorkQueueItem::Type type>
class ScriptItem : public WorkQueueItem {
public:
explicit ScriptItem(const String& script)
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
: m_script(toWK(script))
WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript https://bugs.webkit.org/show_bug.cgi?id=42675 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-22 Reviewed by Kenneth Rohde Christiansen. Tools: Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoadingScript): (WTR): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoadingScript): (WTR): (WTR::TestRunner::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR): (WTR::runJavaScriptFunction): (ScriptItem): (WTR::ScriptItem::ScriptItem): (WTR::ScriptItem::invoke): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::queueLoadingScript): (WTR::WorkQueueManager::queueNonLoadingScript): * WebKitTestRunner/WorkQueueManager.h: (WorkQueueManager): LayoutTests: Unskipped corresponding test cases for WK2. Put those which still fail to appropriate groups. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-22 08:42:08 +00:00
{
}
WorkQueueItem::Type invoke() const
{
WKPageRunJavaScriptInMainFrame(mainPage(), m_script.get(), 0, runJavaScriptFunction);
return type;
}
WKRetainPtr<WKStringRef> m_script;
};
class NavigationItem : public WorkQueueItem {
public:
explicit NavigationItem(int index) : m_index(index) { }
WorkQueueItem::Type invoke() const
{
return goToItemAtIndex(m_index) ? WorkQueueItem::Loading : WorkQueueItem::NonLoading;
}
unsigned m_index;
};
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
WorkQueueManager::WorkQueueManager()
: m_processing(false)
{
}
WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript https://bugs.webkit.org/show_bug.cgi?id=42675 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-22 Reviewed by Kenneth Rohde Christiansen. Tools: Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoadingScript): (WTR): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoadingScript): (WTR): (WTR::TestRunner::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR): (WTR::runJavaScriptFunction): (ScriptItem): (WTR::ScriptItem::ScriptItem): (WTR::ScriptItem::invoke): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::queueLoadingScript): (WTR::WorkQueueManager::queueNonLoadingScript): * WebKitTestRunner/WorkQueueManager.h: (WorkQueueManager): LayoutTests: Unskipped corresponding test cases for WK2. Put those which still fail to appropriate groups. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-22 08:42:08 +00:00
WorkQueueManager::~WorkQueueManager()
{
}
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
void WorkQueueManager::clearWorkQueue()
{
m_processing = false;
m_workQueue.clear();
}
bool WorkQueueManager::processWorkQueue()
{
m_processing = false;
while (!m_processing && !m_workQueue.isEmpty()) {
std::unique_ptr<WorkQueueItem> item(m_workQueue.takeFirst());
WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript https://bugs.webkit.org/show_bug.cgi?id=42675 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-22 Reviewed by Kenneth Rohde Christiansen. Tools: Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoadingScript): (WTR): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoadingScript): (WTR): (WTR::TestRunner::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR): (WTR::runJavaScriptFunction): (ScriptItem): (WTR::ScriptItem::ScriptItem): (WTR::ScriptItem::invoke): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::queueLoadingScript): (WTR::WorkQueueManager::queueNonLoadingScript): * WebKitTestRunner/WorkQueueManager.h: (WorkQueueManager): LayoutTests: Unskipped corresponding test cases for WK2. Put those which still fail to appropriate groups. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-22 08:42:08 +00:00
m_processing = (item->invoke() == WorkQueueItem::Loading);
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
}
return !m_processing;
}
Add WKTR support for "should open external URLs". https://bugs.webkit.org/show_bug.cgi?id=145505 Reviewed by Darin Adler. Source/WebKit2: Expose C-spi to allow WKTR to set this bit on new loads: * UIProcess/API/C/WKPage.cpp: (WKPageLoadURLWithShouldOpenExternalURLsPolicy): * UIProcess/API/C/WKPagePrivate.h: Expose the bit on NavigationAction for the policy delegate: * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: (WKBundleNavigationActionGetShouldOpenExternalURLs): * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h. * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs): * WebKit2.xcodeproj/project.pbxproj: Tools: - Add a new option to "queueLoad" to allow javascript to queue a load that has the "should open external URLs" bit set. - Add a new "dumpPolicyDelegateCallbacks" call to dump the NavigationAction in the policy delegate, including whether or not the bit was set. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::dumpPolicyDelegateCallbacks): (WTR::TestRunner::shouldDumpPolicyCallbacks): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::decidePolicyForNavigationAction): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR::WorkQueueManager::queueLoad): * WebKitTestRunner/WorkQueueManager.h: LayoutTests: * loader/navigation-policy/resources/notify-done.html: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic.html: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic.html: Added. * platform/ios-simulator-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/163561@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-01 19:57:16 +00:00
void WorkQueueManager::queueLoad(const String& url, const String& target, bool shouldOpenExternalURLs)
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
{
class LoadItem : public WorkQueueItem {
public:
Add WKTR support for "should open external URLs". https://bugs.webkit.org/show_bug.cgi?id=145505 Reviewed by Darin Adler. Source/WebKit2: Expose C-spi to allow WKTR to set this bit on new loads: * UIProcess/API/C/WKPage.cpp: (WKPageLoadURLWithShouldOpenExternalURLsPolicy): * UIProcess/API/C/WKPagePrivate.h: Expose the bit on NavigationAction for the policy delegate: * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: (WKBundleNavigationActionGetShouldOpenExternalURLs): * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h. * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs): * WebKit2.xcodeproj/project.pbxproj: Tools: - Add a new option to "queueLoad" to allow javascript to queue a load that has the "should open external URLs" bit set. - Add a new "dumpPolicyDelegateCallbacks" call to dump the NavigationAction in the policy delegate, including whether or not the bit was set. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::dumpPolicyDelegateCallbacks): (WTR::TestRunner::shouldDumpPolicyCallbacks): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::decidePolicyForNavigationAction): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR::WorkQueueManager::queueLoad): * WebKitTestRunner/WorkQueueManager.h: LayoutTests: * loader/navigation-policy/resources/notify-done.html: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic.html: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic.html: Added. * platform/ios-simulator-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/163561@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-01 19:57:16 +00:00
LoadItem(const String& url, const String& target, bool shouldOpenExternalURLs)
WKRetainPtr's adoption constructor should be private https://bugs.webkit.org/show_bug.cgi?id=197019 Reviewed by Tim Horton. Source/WebKit: RefPtr and RetainPtr have already done this. It makes us use nicer syntax. * UIProcess/API/C/WKContext.cpp: (WKContextSetDownloadClient): * UIProcess/API/cpp/WKRetainPtr.h: (WebKit::WKRetainPtr::WKRetainPtr): (WebKit::adoptWK): Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (dumpFramesAsText): * TestWebKitAPI/InjectedBundleController.cpp: (TestWebKitAPI::InjectedBundleController::initialize): * TestWebKitAPI/PlatformUtilities.cpp: (TestWebKitAPI::Util::createContextWithInjectedBundle): (TestWebKitAPI::Util::createInitializationDictionaryForInjectedBundleTest): (TestWebKitAPI::Util::createContextForInjectedBundleTest): (TestWebKitAPI::Util::toWK): * TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic_Bundle.cpp: (TestWebKitAPI::DOMWindowExtensionBasic::initialize): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp: (TestWebKitAPI::DOMWindowExtensionNoCache::initialize): * TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp: (TestWebKitAPI::didRemoveFrameFromHierarchyCallback): * TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash_Bundle.cpp: (TestWebKitAPI::DocumentStartUserScriptAlertCrashTest::initialize): * TestWebKitAPI/Tests/WebKit/EnumerateMediaDevices.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/EvaluateJavaScript.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/EventModifiers.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FailedLoad.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/Find.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FindMatches.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FrameHandle.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/Geolocation.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/GetInjectedBundleInitializationUserDataCallback.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle_Bundle.cpp: (TestWebKitAPI::HitTestResultNodeHandleTest::getContextMenuFromDefaultMenu): * TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior_Bundle.cpp: (TestWebKitAPI::InjectedBundleNoDisableOverrideBuiltinsBehaviorTest::initialize): (TestWebKitAPI::InjectedBundleDisableOverrideBuiltinsBehaviorTest::initialize): * TestWebKitAPI/Tests/WebKit/InjectedBundleFrameHitTest.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleFrameHitTest_Bundle.cpp: (TestWebKitAPI::InjectedBundleFrameHitTestTest::frameLoadFinished): * TestWebKitAPI/Tests/WebKit/InjectedBundleInitializationUserDataCallbackWins.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen_Bundle.cpp: (TestWebKitAPI::InjectedBundleMakeAllShadowRootOpenTest::initialize): * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp: (TestWebKitAPI::loadAlternateHTMLString): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp: (TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader): * TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp: (TestWebKitAPI::buildAndPerformTest): * TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PasteboardNotifications.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PreventEmptyUserAgent.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ProcessDidTerminate.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/UserMedia.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKPreferences.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WillSendSubmitEvent.cpp: (TestWebKitAPI::didReceiveMessageFromInjectedBundle): * TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (TEST): * TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm: (TestWebKitAPI::FullscreenZoomInitialFrame::initializeView): * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemTitleCallback): (WTR::createMouseMessageBody): (WTR::EventSendingController::mouseDown): (WTR::EventSendingController::mouseUp): (WTR::EventSendingController::mouseMoveTo): (WTR::EventSendingController::mouseForceClick): (WTR::EventSendingController::startAndCancelMouseForceClick): (WTR::EventSendingController::mouseForceDown): (WTR::EventSendingController::mouseForceUp): (WTR::EventSendingController::mouseForceChanged): (WTR::EventSendingController::leapForward): (WTR::EventSendingController::scheduleAsynchronousClick): (WTR::createKeyDownMessageBody): (WTR::EventSendingController::keyDown): (WTR::EventSendingController::scheduleAsynchronousKeyDown): (WTR::EventSendingController::mouseScrollBy): (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): (WTR::EventSendingController::continuousMouseScrollBy): (WTR::EventSendingController::addTouchPoint): (WTR::EventSendingController::updateTouchPoint): (WTR::EventSendingController::setTouchModifier): (WTR::EventSendingController::setTouchPointRadius): (WTR::EventSendingController::touchStart): (WTR::EventSendingController::touchMove): (WTR::EventSendingController::touchEnd): (WTR::EventSendingController::touchCancel): (WTR::EventSendingController::clearTouchPoints): (WTR::EventSendingController::releaseTouchPoint): (WTR::EventSendingController::cancelTouchPoint): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::didReceiveMessageToPage): (WTR::InjectedBundle::booleanForKey): (WTR::InjectedBundle::done): (WTR::InjectedBundle::dumpToStdErr): (WTR::InjectedBundle::outputText): (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): (WTR::InjectedBundle::postAddChromeInputField): (WTR::InjectedBundle::postRemoveChromeInputField): (WTR::InjectedBundle::postFocusWebView): (WTR::InjectedBundle::postSetBackingScaleFactor): (WTR::InjectedBundle::postSetWindowIsKey): (WTR::InjectedBundle::postSetViewSize): (WTR::InjectedBundle::postSimulateWebNotificationClick): (WTR::InjectedBundle::postSetAddsVisitedLinks): (WTR::InjectedBundle::setGeolocationPermission): (WTR::InjectedBundle::setMockGeolocationPosition): (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): (WTR::InjectedBundle::isGeolocationProviderActive const): (WTR::InjectedBundle::imageCountInGeneralPasteboard const): (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): (WTR::InjectedBundle::setCustomPolicyDelegate): (WTR::InjectedBundle::setHidden): (WTR::InjectedBundle::setCacheModel): (WTR::InjectedBundle::shouldProcessWorkQueue const): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueForwardNavigation): (WTR::InjectedBundle::queueLoad): (WTR::InjectedBundle::queueLoadHTMLString): (WTR::InjectedBundle::queueReload): (WTR::InjectedBundle::queueLoadingScript): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::frameToStr): (WTR::InjectedBundlePage::InjectedBundlePage): (WTR::dumpFrameDescriptionSuitableForTestResult): (WTR::dumpFrameScrollPosition): (WTR::dumpDescendantFrameScrollPositions): (WTR::dumpFrameText): (WTR::dumpDescendantFramesText): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::shouldDumpPixels const): (WTR::TestRunner::setDumpPixels): (WTR::TestRunner::whatToDump const): (WTR::TestRunner::setWhatToDump): (WTR::TestRunner::setWaitUntilDone): (WTR::TestRunner::shouldWaitUntilDone const): (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): (WTR::TestRunner::shouldDumpFrameLoadCallbacks): (WTR::TestRunner::clearAllDatabases): (WTR::TestRunner::setIDBPerOriginQuota): (WTR::TestRunner::originsWithApplicationCache): (WTR::TestRunner::setCanOpenWindows): (WTR::TestRunner::setXSSAuditorEnabled): (WTR::TestRunner::setMediaDevicesEnabled): (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): (WTR::TestRunner::setWebRTCUnifiedPlanEnabled): (WTR::TestRunner::setCustomUserAgent): (WTR::TestRunner::setWebAPIStatisticsEnabled): (WTR::TestRunner::setModernMediaControlsEnabled): (WTR::TestRunner::setWebGL2Enabled): (WTR::TestRunner::setWritableStreamAPIEnabled): (WTR::TestRunner::setReadableByteStreamAPIEnabled): (WTR::TestRunner::setEncryptedMediaAPIEnabled): (WTR::TestRunner::setAllowsAnySSLCertificate): (WTR::TestRunner::setPluginsEnabled): (WTR::TestRunner::setValueForUser): (WTR::TestRunner::setAudioResult): (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): (WTR::TestRunner::setAlwaysAcceptCookies): (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): (WTR::TestRunner::isDoingMediaCapture const): (WTR::TestRunner::queueLoad): (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): (WTR::TestRunner::setHandlesAuthenticationChallenges): (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): (WTR::TestRunner::setShouldLogDownloadCallbacks): (WTR::TestRunner::setAuthenticationUsername): (WTR::TestRunner::setAuthenticationPassword): (WTR::TestRunner::secureEventInputIsEnabled const): (WTR::TestRunner::setBlockAllPlugins): (WTR::TestRunner::setPluginSupportedMode): (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): (WTR::TestRunner::setNavigationGesturesEnabled): (WTR::TestRunner::setIgnoresViewportScaleLimits): (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): (WTR::TestRunner::terminateNetworkProcess): (WTR::TestRunner::terminateServiceWorkerProcess): (WTR::TestRunner::runUIScript): (WTR::TestRunner::setStatisticsDebugMode): (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): (WTR::TestRunner::setStatisticsLastSeen): (WTR::TestRunner::setStatisticsPrevalentResource): (WTR::TestRunner::setStatisticsVeryPrevalentResource): (WTR::TestRunner::dumpResourceLoadStatistics): (WTR::TestRunner::isStatisticsPrevalentResource): (WTR::TestRunner::isStatisticsVeryPrevalentResource): (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): (WTR::TestRunner::setStatisticsHasHadUserInteraction): (WTR::TestRunner::isStatisticsHasHadUserInteraction): (WTR::TestRunner::setStatisticsGrandfathered): (WTR::TestRunner::isStatisticsGrandfathered): (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): (WTR::TestRunner::installStatisticsDidScanDataRecordsCallback): (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): (WTR::TestRunner::statisticsUpdateCookieBlocking): (WTR::TestRunner::statisticsSubmitTelemetry): (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): (WTR::TestRunner::setStatisticsIsRunningTest): (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): (WTR::TestRunner::setStatisticsNotifyPagesWhenTelemetryWasCaptured): (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): (WTR::TestRunner::setStatisticsGrandfatheringTime): (WTR::TestRunner::setStatisticsMaxStatisticsEntries): (WTR::TestRunner::setStatisticsPruneEntriesDownTo): (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): (WTR::TestRunner::statisticsDeleteCookiesForHost): (WTR::TestRunner::setStatisticsCacheMaxAgeCap): (WTR::TestRunner::statisticsResetToConsistentState): (WTR::TestRunner::setStorageAccessAPIEnabled): (WTR::TestRunner::getAllStorageAccessEntries): (WTR::TestRunner::addMockMediaDevice): (WTR::TestRunner::clearMockMediaDevices): (WTR::TestRunner::removeMockMediaDevice): (WTR::TestRunner::resetMockMediaDevices): (WTR::TestRunner::connectMockGamepad): (WTR::TestRunner::disconnectMockGamepad): (WTR::TestRunner::setMockGamepadDetails): (WTR::TestRunner::setMockGamepadAxisValue): (WTR::TestRunner::setMockGamepadButtonValue): (WTR::TestRunner::removeAllSessionCredentials): (WTR::TestRunner::clearDOMCache): (WTR::TestRunner::clearDOMCaches): (WTR::TestRunner::hasDOMCache): (WTR::TestRunner::domCacheSize): (WTR::TestRunner::setAllowStorageQuotaIncrease): (WTR::TestRunner::getApplicationManifestThen): (WTR::TestRunner::injectUserScript): (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): (WTR::TestRunner::setWebAuthenticationMockConfiguration): (WTR::TestRunner::addTestKeyToKeychain): (WTR::TestRunner::cleanUpKeychain): (WTR::TestRunner::keyExistsInKeychain): (WTR::TestRunner::setCanHandleHTTPSServerTrustEvaluation): (WTR::TestRunner::canDoServerTrustEvaluationInNetworkProcess): (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): (WTR::parseStringTestHeaderValueAsRelativePath): (WTR::updateTestOptionsFromTestHeader): (WTR::TestController::runTest): (WTR::TestController::didReceiveLiveDocumentsList): (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): (WTR::TestController::didFinishNavigation): (WTR::TestController::didReceiveAuthenticationChallenge): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): (WTR::TestInvocation::uiScriptDidComplete): (WTR::TestInvocation::didReceiveAllStorageAccessEntries): * WebKitTestRunner/WebNotificationProvider.cpp: (WTR::WebNotificationProvider::closeWebNotification): * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueLoadHTMLString): Canonical link: https://commits.webkit.org/211276@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-17 18:28:56 +00:00
: m_url(adoptWK(WKURLCreateWithUTF8CString(url.utf8().data())))
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
, m_target(target)
Add WKTR support for "should open external URLs". https://bugs.webkit.org/show_bug.cgi?id=145505 Reviewed by Darin Adler. Source/WebKit2: Expose C-spi to allow WKTR to set this bit on new loads: * UIProcess/API/C/WKPage.cpp: (WKPageLoadURLWithShouldOpenExternalURLsPolicy): * UIProcess/API/C/WKPagePrivate.h: Expose the bit on NavigationAction for the policy delegate: * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: (WKBundleNavigationActionGetShouldOpenExternalURLs): * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h. * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs): * WebKit2.xcodeproj/project.pbxproj: Tools: - Add a new option to "queueLoad" to allow javascript to queue a load that has the "should open external URLs" bit set. - Add a new "dumpPolicyDelegateCallbacks" call to dump the NavigationAction in the policy delegate, including whether or not the bit was set. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::dumpPolicyDelegateCallbacks): (WTR::TestRunner::shouldDumpPolicyCallbacks): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::decidePolicyForNavigationAction): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR::WorkQueueManager::queueLoad): * WebKitTestRunner/WorkQueueManager.h: LayoutTests: * loader/navigation-policy/resources/notify-done.html: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic.html: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic.html: Added. * platform/ios-simulator-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/163561@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-01 19:57:16 +00:00
, m_shouldOpenExternalURLs(shouldOpenExternalURLs)
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
{
}
WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript https://bugs.webkit.org/show_bug.cgi?id=42675 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-22 Reviewed by Kenneth Rohde Christiansen. Tools: Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoadingScript): (WTR): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoadingScript): (WTR): (WTR::TestRunner::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR): (WTR::runJavaScriptFunction): (ScriptItem): (WTR::ScriptItem::ScriptItem): (WTR::ScriptItem::invoke): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::queueLoadingScript): (WTR::WorkQueueManager::queueNonLoadingScript): * WebKitTestRunner/WorkQueueManager.h: (WorkQueueManager): LayoutTests: Unskipped corresponding test cases for WK2. Put those which still fail to appropriate groups. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-22 08:42:08 +00:00
WorkQueueItem::Type invoke() const
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
{
if (!m_target.isEmpty()) {
// FIXME: Use target. Some layout tests cannot pass as they rely on this functionality.
fprintf(stderr, "queueLoad for a specific target is not implemented.\n");
WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript https://bugs.webkit.org/show_bug.cgi?id=42675 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-22 Reviewed by Kenneth Rohde Christiansen. Tools: Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoadingScript): (WTR): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoadingScript): (WTR): (WTR::TestRunner::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR): (WTR::runJavaScriptFunction): (ScriptItem): (WTR::ScriptItem::ScriptItem): (WTR::ScriptItem::invoke): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::queueLoadingScript): (WTR::WorkQueueManager::queueNonLoadingScript): * WebKitTestRunner/WorkQueueManager.h: (WorkQueueManager): LayoutTests: Unskipped corresponding test cases for WK2. Put those which still fail to appropriate groups. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-22 08:42:08 +00:00
return WorkQueueItem::NonLoading;
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
}
Add WKTR support for "should open external URLs". https://bugs.webkit.org/show_bug.cgi?id=145505 Reviewed by Darin Adler. Source/WebKit2: Expose C-spi to allow WKTR to set this bit on new loads: * UIProcess/API/C/WKPage.cpp: (WKPageLoadURLWithShouldOpenExternalURLsPolicy): * UIProcess/API/C/WKPagePrivate.h: Expose the bit on NavigationAction for the policy delegate: * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: (WKBundleNavigationActionGetShouldOpenExternalURLs): * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h. * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs): * WebKit2.xcodeproj/project.pbxproj: Tools: - Add a new option to "queueLoad" to allow javascript to queue a load that has the "should open external URLs" bit set. - Add a new "dumpPolicyDelegateCallbacks" call to dump the NavigationAction in the policy delegate, including whether or not the bit was set. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::dumpPolicyDelegateCallbacks): (WTR::TestRunner::shouldDumpPolicyCallbacks): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::decidePolicyForNavigationAction): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR::WorkQueueManager::queueLoad): * WebKitTestRunner/WorkQueueManager.h: LayoutTests: * loader/navigation-policy/resources/notify-done.html: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic.html: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic.html: Added. * platform/ios-simulator-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/163561@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-01 19:57:16 +00:00
WKPageLoadURLWithShouldOpenExternalURLsPolicy(mainPage(), m_url.get(), m_shouldOpenExternalURLs);
WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript https://bugs.webkit.org/show_bug.cgi?id=42675 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-22 Reviewed by Kenneth Rohde Christiansen. Tools: Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoadingScript): (WTR): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoadingScript): (WTR): (WTR::TestRunner::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR): (WTR::runJavaScriptFunction): (ScriptItem): (WTR::ScriptItem::ScriptItem): (WTR::ScriptItem::invoke): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::queueLoadingScript): (WTR::WorkQueueManager::queueNonLoadingScript): * WebKitTestRunner/WorkQueueManager.h: (WorkQueueManager): LayoutTests: Unskipped corresponding test cases for WK2. Put those which still fail to appropriate groups. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-22 08:42:08 +00:00
return WorkQueueItem::Loading;
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
}
WKRetainPtr<WKURLRef> m_url;
String m_target;
Add WKTR support for "should open external URLs". https://bugs.webkit.org/show_bug.cgi?id=145505 Reviewed by Darin Adler. Source/WebKit2: Expose C-spi to allow WKTR to set this bit on new loads: * UIProcess/API/C/WKPage.cpp: (WKPageLoadURLWithShouldOpenExternalURLsPolicy): * UIProcess/API/C/WKPagePrivate.h: Expose the bit on NavigationAction for the policy delegate: * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: (WKBundleNavigationActionGetShouldOpenExternalURLs): * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h. * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs): * WebKit2.xcodeproj/project.pbxproj: Tools: - Add a new option to "queueLoad" to allow javascript to queue a load that has the "should open external URLs" bit set. - Add a new "dumpPolicyDelegateCallbacks" call to dump the NavigationAction in the policy delegate, including whether or not the bit was set. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::dumpPolicyDelegateCallbacks): (WTR::TestRunner::shouldDumpPolicyCallbacks): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::decidePolicyForNavigationAction): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR::WorkQueueManager::queueLoad): * WebKitTestRunner/WorkQueueManager.h: LayoutTests: * loader/navigation-policy/resources/notify-done.html: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic.html: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic.html: Added. * platform/ios-simulator-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/163561@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-01 19:57:16 +00:00
bool m_shouldOpenExternalURLs;
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
};
Add WKTR support for "should open external URLs". https://bugs.webkit.org/show_bug.cgi?id=145505 Reviewed by Darin Adler. Source/WebKit2: Expose C-spi to allow WKTR to set this bit on new loads: * UIProcess/API/C/WKPage.cpp: (WKPageLoadURLWithShouldOpenExternalURLsPolicy): * UIProcess/API/C/WKPagePrivate.h: Expose the bit on NavigationAction for the policy delegate: * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: (WKBundleNavigationActionGetShouldOpenExternalURLs): * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h. * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs): * WebKit2.xcodeproj/project.pbxproj: Tools: - Add a new option to "queueLoad" to allow javascript to queue a load that has the "should open external URLs" bit set. - Add a new "dumpPolicyDelegateCallbacks" call to dump the NavigationAction in the policy delegate, including whether or not the bit was set. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::dumpPolicyDelegateCallbacks): (WTR::TestRunner::shouldDumpPolicyCallbacks): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::decidePolicyForNavigationAction): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR::WorkQueueManager::queueLoad): * WebKitTestRunner/WorkQueueManager.h: LayoutTests: * loader/navigation-policy/resources/notify-done.html: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-load-external-urls-set-by-api-basic.html: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic-expected.txt: Added. * loader/navigation-policy/should-not-load-external-urls-set-by-api-basic.html: Added. * platform/ios-simulator-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/163561@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-01 19:57:16 +00:00
enqueue(new LoadItem(url, target, shouldOpenExternalURLs));
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
}
void WorkQueueManager::queueLoadHTMLString(const String& content, const String& baseURL, const String& unreachableURL)
{
class LoadHTMLStringItem : public WorkQueueItem {
public:
LoadHTMLStringItem(const String& content, const String& baseURL, const String& unreachableURL)
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
: m_content(toWK(content))
WKRetainPtr's adoption constructor should be private https://bugs.webkit.org/show_bug.cgi?id=197019 Reviewed by Tim Horton. Source/WebKit: RefPtr and RetainPtr have already done this. It makes us use nicer syntax. * UIProcess/API/C/WKContext.cpp: (WKContextSetDownloadClient): * UIProcess/API/cpp/WKRetainPtr.h: (WebKit::WKRetainPtr::WKRetainPtr): (WebKit::adoptWK): Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (dumpFramesAsText): * TestWebKitAPI/InjectedBundleController.cpp: (TestWebKitAPI::InjectedBundleController::initialize): * TestWebKitAPI/PlatformUtilities.cpp: (TestWebKitAPI::Util::createContextWithInjectedBundle): (TestWebKitAPI::Util::createInitializationDictionaryForInjectedBundleTest): (TestWebKitAPI::Util::createContextForInjectedBundleTest): (TestWebKitAPI::Util::toWK): * TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic_Bundle.cpp: (TestWebKitAPI::DOMWindowExtensionBasic::initialize): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp: (TestWebKitAPI::DOMWindowExtensionNoCache::initialize): * TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp: (TestWebKitAPI::didRemoveFrameFromHierarchyCallback): * TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash_Bundle.cpp: (TestWebKitAPI::DocumentStartUserScriptAlertCrashTest::initialize): * TestWebKitAPI/Tests/WebKit/EnumerateMediaDevices.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/EvaluateJavaScript.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/EventModifiers.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FailedLoad.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/Find.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FindMatches.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FrameHandle.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/Geolocation.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/GetInjectedBundleInitializationUserDataCallback.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle_Bundle.cpp: (TestWebKitAPI::HitTestResultNodeHandleTest::getContextMenuFromDefaultMenu): * TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior_Bundle.cpp: (TestWebKitAPI::InjectedBundleNoDisableOverrideBuiltinsBehaviorTest::initialize): (TestWebKitAPI::InjectedBundleDisableOverrideBuiltinsBehaviorTest::initialize): * TestWebKitAPI/Tests/WebKit/InjectedBundleFrameHitTest.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleFrameHitTest_Bundle.cpp: (TestWebKitAPI::InjectedBundleFrameHitTestTest::frameLoadFinished): * TestWebKitAPI/Tests/WebKit/InjectedBundleInitializationUserDataCallbackWins.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen_Bundle.cpp: (TestWebKitAPI::InjectedBundleMakeAllShadowRootOpenTest::initialize): * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp: (TestWebKitAPI::loadAlternateHTMLString): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp: (TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader): * TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp: (TestWebKitAPI::buildAndPerformTest): * TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PasteboardNotifications.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PreventEmptyUserAgent.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ProcessDidTerminate.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/UserMedia.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKPreferences.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WillSendSubmitEvent.cpp: (TestWebKitAPI::didReceiveMessageFromInjectedBundle): * TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (TEST): * TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm: (TestWebKitAPI::FullscreenZoomInitialFrame::initializeView): * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemTitleCallback): (WTR::createMouseMessageBody): (WTR::EventSendingController::mouseDown): (WTR::EventSendingController::mouseUp): (WTR::EventSendingController::mouseMoveTo): (WTR::EventSendingController::mouseForceClick): (WTR::EventSendingController::startAndCancelMouseForceClick): (WTR::EventSendingController::mouseForceDown): (WTR::EventSendingController::mouseForceUp): (WTR::EventSendingController::mouseForceChanged): (WTR::EventSendingController::leapForward): (WTR::EventSendingController::scheduleAsynchronousClick): (WTR::createKeyDownMessageBody): (WTR::EventSendingController::keyDown): (WTR::EventSendingController::scheduleAsynchronousKeyDown): (WTR::EventSendingController::mouseScrollBy): (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): (WTR::EventSendingController::continuousMouseScrollBy): (WTR::EventSendingController::addTouchPoint): (WTR::EventSendingController::updateTouchPoint): (WTR::EventSendingController::setTouchModifier): (WTR::EventSendingController::setTouchPointRadius): (WTR::EventSendingController::touchStart): (WTR::EventSendingController::touchMove): (WTR::EventSendingController::touchEnd): (WTR::EventSendingController::touchCancel): (WTR::EventSendingController::clearTouchPoints): (WTR::EventSendingController::releaseTouchPoint): (WTR::EventSendingController::cancelTouchPoint): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::didReceiveMessageToPage): (WTR::InjectedBundle::booleanForKey): (WTR::InjectedBundle::done): (WTR::InjectedBundle::dumpToStdErr): (WTR::InjectedBundle::outputText): (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): (WTR::InjectedBundle::postAddChromeInputField): (WTR::InjectedBundle::postRemoveChromeInputField): (WTR::InjectedBundle::postFocusWebView): (WTR::InjectedBundle::postSetBackingScaleFactor): (WTR::InjectedBundle::postSetWindowIsKey): (WTR::InjectedBundle::postSetViewSize): (WTR::InjectedBundle::postSimulateWebNotificationClick): (WTR::InjectedBundle::postSetAddsVisitedLinks): (WTR::InjectedBundle::setGeolocationPermission): (WTR::InjectedBundle::setMockGeolocationPosition): (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): (WTR::InjectedBundle::isGeolocationProviderActive const): (WTR::InjectedBundle::imageCountInGeneralPasteboard const): (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): (WTR::InjectedBundle::setCustomPolicyDelegate): (WTR::InjectedBundle::setHidden): (WTR::InjectedBundle::setCacheModel): (WTR::InjectedBundle::shouldProcessWorkQueue const): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueForwardNavigation): (WTR::InjectedBundle::queueLoad): (WTR::InjectedBundle::queueLoadHTMLString): (WTR::InjectedBundle::queueReload): (WTR::InjectedBundle::queueLoadingScript): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::frameToStr): (WTR::InjectedBundlePage::InjectedBundlePage): (WTR::dumpFrameDescriptionSuitableForTestResult): (WTR::dumpFrameScrollPosition): (WTR::dumpDescendantFrameScrollPositions): (WTR::dumpFrameText): (WTR::dumpDescendantFramesText): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::shouldDumpPixels const): (WTR::TestRunner::setDumpPixels): (WTR::TestRunner::whatToDump const): (WTR::TestRunner::setWhatToDump): (WTR::TestRunner::setWaitUntilDone): (WTR::TestRunner::shouldWaitUntilDone const): (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): (WTR::TestRunner::shouldDumpFrameLoadCallbacks): (WTR::TestRunner::clearAllDatabases): (WTR::TestRunner::setIDBPerOriginQuota): (WTR::TestRunner::originsWithApplicationCache): (WTR::TestRunner::setCanOpenWindows): (WTR::TestRunner::setXSSAuditorEnabled): (WTR::TestRunner::setMediaDevicesEnabled): (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): (WTR::TestRunner::setWebRTCUnifiedPlanEnabled): (WTR::TestRunner::setCustomUserAgent): (WTR::TestRunner::setWebAPIStatisticsEnabled): (WTR::TestRunner::setModernMediaControlsEnabled): (WTR::TestRunner::setWebGL2Enabled): (WTR::TestRunner::setWritableStreamAPIEnabled): (WTR::TestRunner::setReadableByteStreamAPIEnabled): (WTR::TestRunner::setEncryptedMediaAPIEnabled): (WTR::TestRunner::setAllowsAnySSLCertificate): (WTR::TestRunner::setPluginsEnabled): (WTR::TestRunner::setValueForUser): (WTR::TestRunner::setAudioResult): (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): (WTR::TestRunner::setAlwaysAcceptCookies): (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): (WTR::TestRunner::isDoingMediaCapture const): (WTR::TestRunner::queueLoad): (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): (WTR::TestRunner::setHandlesAuthenticationChallenges): (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): (WTR::TestRunner::setShouldLogDownloadCallbacks): (WTR::TestRunner::setAuthenticationUsername): (WTR::TestRunner::setAuthenticationPassword): (WTR::TestRunner::secureEventInputIsEnabled const): (WTR::TestRunner::setBlockAllPlugins): (WTR::TestRunner::setPluginSupportedMode): (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): (WTR::TestRunner::setNavigationGesturesEnabled): (WTR::TestRunner::setIgnoresViewportScaleLimits): (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): (WTR::TestRunner::terminateNetworkProcess): (WTR::TestRunner::terminateServiceWorkerProcess): (WTR::TestRunner::runUIScript): (WTR::TestRunner::setStatisticsDebugMode): (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): (WTR::TestRunner::setStatisticsLastSeen): (WTR::TestRunner::setStatisticsPrevalentResource): (WTR::TestRunner::setStatisticsVeryPrevalentResource): (WTR::TestRunner::dumpResourceLoadStatistics): (WTR::TestRunner::isStatisticsPrevalentResource): (WTR::TestRunner::isStatisticsVeryPrevalentResource): (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): (WTR::TestRunner::setStatisticsHasHadUserInteraction): (WTR::TestRunner::isStatisticsHasHadUserInteraction): (WTR::TestRunner::setStatisticsGrandfathered): (WTR::TestRunner::isStatisticsGrandfathered): (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): (WTR::TestRunner::installStatisticsDidScanDataRecordsCallback): (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): (WTR::TestRunner::statisticsUpdateCookieBlocking): (WTR::TestRunner::statisticsSubmitTelemetry): (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): (WTR::TestRunner::setStatisticsIsRunningTest): (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): (WTR::TestRunner::setStatisticsNotifyPagesWhenTelemetryWasCaptured): (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): (WTR::TestRunner::setStatisticsGrandfatheringTime): (WTR::TestRunner::setStatisticsMaxStatisticsEntries): (WTR::TestRunner::setStatisticsPruneEntriesDownTo): (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): (WTR::TestRunner::statisticsDeleteCookiesForHost): (WTR::TestRunner::setStatisticsCacheMaxAgeCap): (WTR::TestRunner::statisticsResetToConsistentState): (WTR::TestRunner::setStorageAccessAPIEnabled): (WTR::TestRunner::getAllStorageAccessEntries): (WTR::TestRunner::addMockMediaDevice): (WTR::TestRunner::clearMockMediaDevices): (WTR::TestRunner::removeMockMediaDevice): (WTR::TestRunner::resetMockMediaDevices): (WTR::TestRunner::connectMockGamepad): (WTR::TestRunner::disconnectMockGamepad): (WTR::TestRunner::setMockGamepadDetails): (WTR::TestRunner::setMockGamepadAxisValue): (WTR::TestRunner::setMockGamepadButtonValue): (WTR::TestRunner::removeAllSessionCredentials): (WTR::TestRunner::clearDOMCache): (WTR::TestRunner::clearDOMCaches): (WTR::TestRunner::hasDOMCache): (WTR::TestRunner::domCacheSize): (WTR::TestRunner::setAllowStorageQuotaIncrease): (WTR::TestRunner::getApplicationManifestThen): (WTR::TestRunner::injectUserScript): (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): (WTR::TestRunner::setWebAuthenticationMockConfiguration): (WTR::TestRunner::addTestKeyToKeychain): (WTR::TestRunner::cleanUpKeychain): (WTR::TestRunner::keyExistsInKeychain): (WTR::TestRunner::setCanHandleHTTPSServerTrustEvaluation): (WTR::TestRunner::canDoServerTrustEvaluationInNetworkProcess): (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): (WTR::parseStringTestHeaderValueAsRelativePath): (WTR::updateTestOptionsFromTestHeader): (WTR::TestController::runTest): (WTR::TestController::didReceiveLiveDocumentsList): (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): (WTR::TestController::didFinishNavigation): (WTR::TestController::didReceiveAuthenticationChallenge): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): (WTR::TestInvocation::uiScriptDidComplete): (WTR::TestInvocation::didReceiveAllStorageAccessEntries): * WebKitTestRunner/WebNotificationProvider.cpp: (WTR::WebNotificationProvider::closeWebNotification): * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueLoadHTMLString): Canonical link: https://commits.webkit.org/211276@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-17 18:28:56 +00:00
, m_baseURL(adoptWK(WKURLCreateWithUTF8CString(baseURL.utf8().data())))
, m_unreachableURL(adoptWK(WKURLCreateWithUTF8CString(unreachableURL.utf8().data())))
{
}
WorkQueueItem::Type invoke() const
{
WKPageLoadAlternateHTMLString(mainPage(), m_content.get(), m_baseURL.get(), m_unreachableURL.get());
return WorkQueueItem::Loading;
}
WKRetainPtr<WKStringRef> m_content;
WKRetainPtr<WKURLRef> m_baseURL;
WKRetainPtr<WKURLRef> m_unreachableURL;
};
enqueue(new LoadHTMLStringItem(content, baseURL, unreachableURL));
}
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
void WorkQueueManager::queueBackNavigation(unsigned howFarBackward)
{
enqueue(new NavigationItem(-howFarBackward));
}
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
void WorkQueueManager::queueForwardNavigation(unsigned howFarForward)
{
enqueue(new NavigationItem(howFarForward));
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
}
void WorkQueueManager::queueReload()
{
class ReloadItem : public WorkQueueItem {
public:
WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript https://bugs.webkit.org/show_bug.cgi?id=42675 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-22 Reviewed by Kenneth Rohde Christiansen. Tools: Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoadingScript): (WTR): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoadingScript): (WTR): (WTR::TestRunner::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR): (WTR::runJavaScriptFunction): (ScriptItem): (WTR::ScriptItem::ScriptItem): (WTR::ScriptItem::invoke): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::queueLoadingScript): (WTR::WorkQueueManager::queueNonLoadingScript): * WebKitTestRunner/WorkQueueManager.h: (WorkQueueManager): LayoutTests: Unskipped corresponding test cases for WK2. Put those which still fail to appropriate groups. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-22 08:42:08 +00:00
WorkQueueItem::Type invoke() const
{
WKPageReload(mainPage());
WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript https://bugs.webkit.org/show_bug.cgi?id=42675 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-22 Reviewed by Kenneth Rohde Christiansen. Tools: Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoadingScript): (WTR): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoadingScript): (WTR): (WTR::TestRunner::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR): (WTR::runJavaScriptFunction): (ScriptItem): (WTR::ScriptItem::ScriptItem): (WTR::ScriptItem::invoke): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::queueLoadingScript): (WTR::WorkQueueManager::queueNonLoadingScript): * WebKitTestRunner/WorkQueueManager.h: (WorkQueueManager): LayoutTests: Unskipped corresponding test cases for WK2. Put those which still fail to appropriate groups. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-22 08:42:08 +00:00
return WorkQueueItem::Loading;
}
};
enqueue(new ReloadItem());
}
WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript https://bugs.webkit.org/show_bug.cgi?id=42675 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-22 Reviewed by Kenneth Rohde Christiansen. Tools: Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::queueLoadingScript): (WTR): (WTR::InjectedBundle::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueLoadingScript): (WTR): (WTR::TestRunner::queueNonLoadingScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WorkQueueManager.cpp: (WTR): (WTR::runJavaScriptFunction): (ScriptItem): (WTR::ScriptItem::ScriptItem): (WTR::ScriptItem::invoke): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::queueLoadingScript): (WTR::WorkQueueManager::queueNonLoadingScript): * WebKitTestRunner/WorkQueueManager.h: (WorkQueueManager): LayoutTests: Unskipped corresponding test cases for WK2. Put those which still fail to appropriate groups. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-22 08:42:08 +00:00
void WorkQueueManager::queueLoadingScript(const String& script)
{
enqueue(new ScriptItem<WorkQueueItem::Loading>(script));
}
void WorkQueueManager::queueNonLoadingScript(const String& script)
{
enqueue(new ScriptItem<WorkQueueItem::NonLoading>(script));
}
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
void WorkQueueManager::enqueue(WorkQueueItem* item)
{
ASSERT(item);
if (m_processing) {
fprintf(stderr, "Attempt to enqueue a work item while queue is being processed.\n");
delete item;
return;
}
m_workQueue.append(std::unique_ptr<WorkQueueItem>(item));
WebKitTestRunner needs testRunner.queueLoad https://bugs.webkit.org/show_bug.cgi?id=42674 Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17 Reviewed by Kenneth Rohde Christiansen. Tools: Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process (as the needed functionality, like loading initiation, has to be invoked from UI process) and exchanges messages with Injected bundle. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/GNUmakefile.am: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::InjectedBundle): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::done): (WTR::InjectedBundle::shouldProcessWorkQueue): (WTR): (WTR::InjectedBundle::processWorkQueue): (WTR::InjectedBundle::queueBackNavigation): (WTR::InjectedBundle::queueLoad): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didFinishLoadForFrame): (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): (WTR::InjectedBundlePage::locationChangeForFrame): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: (InjectedBundlePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::queueBackNavigation): (WTR): (WTR::TestRunner::queueLoad): * WebKitTestRunner/InjectedBundle/TestRunner.h: (TestRunner): * WebKitTestRunner/Target.pri: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::workQueueManager): (TestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WorkQueueManager.cpp: Added. (WTR): (WTR::mainPage): (WTR::goToItemAtIndex): (WTR::WorkQueueManager::WorkQueueManager): (WTR::WorkQueueManager::clearWorkQueue): (WTR::WorkQueueManager::processWorkQueue): (WTR::WorkQueueManager::queueLoad): (WTR::WorkQueueManager::queueBackNavigation): (WTR::WorkQueueManager::enqueue): * WebKitTestRunner/WorkQueueManager.h: Added. (WTR): (WorkQueueManager): (WTR::WorkQueueManager::isWorkQueueEmpty): (WorkQueueItem): (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem): * WebKitTestRunner/win/WebKitTestRunner.vcproj: LayoutTests: Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups. * platform/efl-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/117517@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 07:54:23 +00:00
}
} // namespace WTR