WebKit Bugzilla
Attachment 370261 Details for
Bug 198044
: Replace Util::run with runUntil that takes a bool reference instead of a pointer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198044-20190520103342.patch (text/plain), 647.10 KB, created by
Alex Christensen
on 2019-05-20 10:33:43 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-05-20 10:33:43 PDT
Size:
647.10 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 245517) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,747 @@ >+2019-05-20 Alex Christensen <achristensen@webkit.org> >+ >+ Replace Util::run with runUntil that takes a bool reference instead of a pointer >+ https://bugs.webkit.org/show_bug.cgi?id=198044 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This makes the syntax nicer. >+ >+ * TestWebKitAPI/EditingTestHarness.mm: >+ (-[EditingTestHarness _execCommand:argument:expectEntries:]): >+ * TestWebKitAPI/JavaScriptTest.cpp: >+ (TestWebKitAPI::runJSTest): >+ * TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WTF/RefPtr.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WTF/RunLoop.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: >+ (TestWebKitAPI::TEST_F): >+ * TestWebKitAPI/Tests/WebCore/LineBreaking.mm: >+ (testAFewStrings): >+ * TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm: >+ (TestWebKitAPI::WebCoreNSURLSessionTest::SetUp): >+ (TestWebKitAPI::TEST_F): >+ * TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/CanHandleRequest.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/CookieManager.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/DidAssociateFormControls.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/DownloadDecideDestinationCrash.cpp: >+ (TestWebKitAPI::TEST): >+ * 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/FirstVisuallyNonEmptyMilestoneWithDeferredScript.mm: >+ (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/GetUserMediaNavigation.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/InjectedBundleFrameHitTest.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/InjectedBundleInitializationUserDataCallbackWins.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp: >+ (TestWebKitAPI::loadAlternateHTMLString): >+ * TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp: >+ (TestWebKitAPI::buildAndPerformTest): >+ * TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/NavigationClientDefaultCrypto.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/NetworkProcessCrashWithPendingConnection.mm: >+ (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/NoHistoryItemScrollToFragment.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/ParentFrame.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/ResponsivenessTimerCrash.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp: >+ (TestWebKitAPI::createSessionStateData): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp: >+ (TestWebKitAPI::createSessionStateDataContainingFormData): >+ (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/TextFieldDidBeginAndEndEditing.cpp: >+ (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::executeJavaScriptAndCheckDidReceiveMessage): >+ * TestWebKitAPI/Tests/WebKit/UserMedia.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/UserMessage.cpp: >+ (TestWebKitAPI::WebKit2UserMessageRoundTripTest::SetUp): >+ (TestWebKitAPI::WebKit2UserMessageRoundTripTest::roundTrip): >+ * TestWebKitAPI/Tests/WebKit/ViewportSizeForViewportUnits.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKit/WKBackForwardList.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp: >+ (TestWebKitAPI::createSessionStates): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp: >+ (TestWebKitAPI::createSessionState): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/WebArchive.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/WebCoreStatisticsWithNoWebProcess.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/WillLoad.cpp: >+ (TestWebKitAPI::WebKit2WillLoadTest::testWillLoadURLRequestReturnValues): >+ (TestWebKitAPI::WebKit2WillLoadTest::testWillLoadDataRequestReturnValues): >+ * TestWebKitAPI/Tests/WebKit/WillSendSubmitEvent.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.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/GetBackingScaleFactor.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/AVFoundationPreference.mm: >+ (TestWebKitAPI::AVFoundationPref::testWithPreference): >+ * TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLs.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/AdditionalSupportedImageTypes.mm: >+ (runTest): >+ * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm: >+ (-[AutoLayoutWKWebView waitForContentSizeChangeResettingWidth:]): >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/BundleEditingDelegate.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/BundleParameters.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/BundleRangeHandle.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: >+ (TestWebKitAPI::TEST): >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewAfterEnterFullscreen.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewDuringEnterFullscreen.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm: >+ (WebKit2_CommandBackForwardTestWKView::loadFiles): >+ (TEST_F): >+ * TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm: >+ (TEST): >+ (downloadTest): >+ (loadAlternateTest): >+ (-[LazilyLoadPlatformFrameworksController expectParentalControlsLoaded:networkExtensionLoaded:]): >+ * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: >+ (makeContentRuleList): >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/CookieAcceptPolicy.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm: >+ (-[WKWebView synchronouslyDetectDataWithTypes:]): >+ (-[WKWebView synchronouslyRemoveDataDetectedLinks]): >+ (expectLinkCount): >+ * TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm: >+ (TEST): >+ (runDecidePolicyForNavigationActionForHyperlinkThatRedirects): >+ * TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm: >+ (runDeviceOrientationTest): >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/DoAfterNextPresentationUpdateAfterCrash.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm: >+ (-[TestWKWebView synchronouslyRequestDocumentContext:]): >+ (-[TestWKWebView synchronouslyAdjustSelectionWithDelta:]): >+ (-[TestWKWebView synchronouslyRequestTextInputContextsInRect:]): >+ * TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm: >+ * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: >+ (runTest): >+ (TEST): >+ (-[CancelDownloadWhileDecidingDestinationDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]): >+ (-[DownloadAttributeTestDelegate waitForDidFinishNavigation]): >+ (-[DownloadAttributeTestDelegate waitForDownloadDidStart]): >+ (TestWebKitAPI::downloadAtRate): >+ * TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm: >+ (-[DownloadProgressTestRunner subscribeAndWaitForProgress]): >+ (-[DownloadProgressTestRunner waitToLoseProgress]): >+ (-[DownloadProgressTestRunner startDownload:expectedLength:]): >+ (-[DownloadProgressTestRunner waitForDownloadDidCreateDestination]): >+ (-[DownloadProgressTestRunner waitForDownloadFinished]): >+ (-[DownloadProgressTestRunner waitForDownloadCanceled]): >+ (-[DownloadProgressTestRunner waitForDownloadFailed]): >+ (-[DownloadProgressTestRunner waitForUpdatedCompletedUnitCount]): >+ * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: >+ (findMatches): >+ (replaceMatches): >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/FixedLayoutSize.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/FullscreenTopContentInset.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/Geolocation.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm: >+ (TestWebKitAPI::GetDisplayMediaTest::promptForCapture): >+ * TestWebKitAPI/Tests/WebKitCocoa/GetResourceData.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm: >+ (runTest): >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm: >+ (getNextMessage): >+ * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBStructuredCloneBackwardCompatibility.mm: >+ (getNextMessage): >+ * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm: >+ (runTestAndCheckResult): >+ * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBTempFileSize.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBUserDelete.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/JavaScriptDuringNavigation.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageNullEntries.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageQuirkTest.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm: >+ (-[NavigationActionTestDelegate waitForNavigationActionCallback]): >+ (-[NavigationActionTestDelegate waitForDidFinishNavigation]): >+ * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: >+ (getNowPlayingClient): >+ (NowPlayingTest::runScriptWithUserGesture): >+ (NowPlayingTest::runScriptWithoutUserGesture): >+ (NowPlayingTest::executeAndWaitForPlaying): >+ (NowPlayingTest::executeAndWaitForWebViewToBecomeNowPlaying): >+ * TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm: >+ (-[NowPlayingTestWebView hasActiveNowPlayingSession]): >+ * TestWebKitAPI/Tests/WebKitCocoa/ObservedRenderingProgressEventsAfterCrash.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm: >+ (waitForDelay): >+ * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm: >+ (-[TestWKWebView waitForMessage:afterEvaluatingScript:]): >+ * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: >+ (waitUntilOnLoadIsCompleted): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/PluginLoadClientPolicies.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/Preferences.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm: >+ (PreferredAudioBufferSize::runPlayingTestWithPageNamed): >+ * TestWebKitAPI/Tests/WebKitCocoa/PrepareForMoveToWindow.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: >+ * TestWebKitAPI/Tests/WebKitCocoa/ProvisionalURLNotChange.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm: >+ (runTest): >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/RenderedImageWithOptions.mm: >+ (runTestWithWidth): >+ * TestWebKitAPI/Tests/WebKitCocoa/RenderingProgress.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: >+ (-[WKWebView synchronouslyRequestTextInputContextsInRect:]): >+ (-[WKWebView synchronouslyFocusTextInputContext:]): >+ * TestWebKitAPI/Tests/WebKitCocoa/RequiresUserActionForPlayback.mm: >+ (RequiresUserActionForPlaybackTest::testVideoWithAudio): >+ (RequiresUserActionForPlaybackTest::testVideoWithoutAudio): >+ (RequiresUserActionForPlaybackTest::testAudioOnly): >+ * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: >+ (TestWebKitAPI::createSessionStateData): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: >+ * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ShouldOpenExternalURLsInNewWindowActions.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/SnapshotStore.mm: >+ (-[SnapshotTestWKWebView synchronouslyForceRepaint]): >+ * TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm: >+ * TestWebKitAPI/Tests/WebKitCocoa/StoreBlobThenDelete.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: >+ (TEST): >+ (testDidResignInputElementStrongPasswordAppearanceAfterEvaluatingJavaScript): >+ * TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm: >+ (TEST): >+ (expectScriptEvaluatesToColor): >+ (waitForMessages): >+ * TestWebKitAPI/Tests/WebKitCocoa/UserContentWorld.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/UserInitiatedActionInNavigationAction.mm: >+ (UserInitiatedActionTest::loadTest): >+ (TEST_F): >+ * TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm: >+ (MediaCaptureDisabledTest::loadTestAndWaitForMessage): >+ (TEST_F): >+ * TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm: >+ (MediaCaptureSimulateFailedSandbox::loadTestAndWaitForMessage): >+ * TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm: >+ (-[VideoControlsManagerTestWebView expectControlsManager:afterReceivingMessage:]): >+ (-[VideoControlsManagerTestWebView waitForPageToLoadWithAutoplayingVideos:]): >+ (-[VideoControlsManagerTestWebView controlledElementID]): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: >+ (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]): >+ (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]): >+ (-[TestWKWebView attachmentElementMidPoint]): >+ (-[TestWKWebView attachmentElementSize]): >+ (-[TestWKWebView imageElementSize]): >+ (-[_WKAttachment synchronouslySetFileWrapper:newContentType:error:]): >+ (-[_WKAttachment synchronouslySetData:newContentType:newFilename:error:]): >+ (-[NSItemProvider expectType:withData:]): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm: >+ (TEST_F): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: >+ (runTestWithWebsiteDataStore): >+ (TEST): >+ (runWKHTTPCookieStoreWithoutProcessPool): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm: >+ (TEST): >+ (-[NavigationResponseTestDelegate waitForNavigationResponseCallback]): >+ (-[NavigationResponseTestDelegate waitForNavigationFinishedCallback]): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKPDFViewResizeCrash.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKPDFViewStablePresentationUpdateCallback.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: >+ (TEST): >+ (checkCallSequence): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCandidateTests.mm: >+ (-[CandidateTestWebView insertCandidatesAndWaitForResponse:range:]): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDiagnosticLogging.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFirstResponderTests.mm: >+ (-[FirstResponderTestingView initWithFrame:]): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: >+ (-[NavigationTestDelegate waitForDidFinishNavigation]): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WebCryptoMasterKey.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm: >+ (runTest): >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm: >+ (getNextMessage): >+ * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: >+ (getNextMessage): >+ (runWebsiteDataStoreCustomPaths): >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/_WKUserContentExtensionStore.mm: >+ (TEST_F): >+ * TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitLegacy/ios/SnapshotViaRenderInContext.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitLegacy/mac/ClosingWebView.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitLegacy/mac/DeallocWebViewInEventListener.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitLegacy/mac/DownloadThread.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsInvalidScheme.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsTest.mm: >+ (TestWebKitAPI::runTest): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitObjC/PreventImageLoadWithAutoResizing.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm: >+ (TEST_F): >+ * TestWebKitAPI/Tests/WebKitObjC/WKBrowsingContextLoadDelegateTest.mm: >+ (TEST_F): >+ * TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm: >+ (-[WKWebView rectsAtSelectionOffset:withText:]): >+ * TestWebKitAPI/Tests/ios/ActionSheetTests.mm: >+ (TestWebKitAPI::TEST): >+ (TestWebKitAPI::presentActionSheetAndChooseAction): >+ * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/ios/FocusPreservationTests.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: >+ (webViewWithAutofocusedInput): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/ios/RenderingProgressTests.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/ios/SetTimeoutFunction.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/ios/WKScrollViewDelegate.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/ios/WKScrollViewTests.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.mm: >+ (TestWebKitAPI::runTest): >+ * TestWebKitAPI/Tests/mac/BackForwardList.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/CancelLoadFromResourceLoadDelegate.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/CandidateTests.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/CloseNewWindowInNavigationPolicyDelegate.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/ContentFiltering.mm: >+ (TestWebKitAPI::loadAlternateTest): >+ * TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/ContextMenuDefaultItemsHaveTags.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/DOMHTMLVideoElementWrapper.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/DOMNode.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/DOMRangeOfString.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/ElementAtPointInWebFrame.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/FirstResponderSuppression.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/FontManagerTests.mm: >+ (-[TestWKWebView typingAttributes]): >+ * TestWebKitAPI/Tests/mac/FragmentNavigation.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm: >+ (TestWebKitAPI::FullscreenZoomInitialFrame::runTest): >+ * TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/InspectorBar.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm: >+ (TestWebKitAPI::webViewAfterPerformingDragOperation): >+ * TestWebKitAPI/Tests/mac/LimitTitleSize.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/LoadWebArchive.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/MemoryCacheDisableWithinResourceLoadDelegate.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/NavigatorLanguage.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/NoPolicyDelegateResponse.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: >+ (TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest): >+ * TestWebKitAPI/Tests/mac/RenderedImageFromDOMNode.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/SetDocumentURI.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/SimplifyMarkup.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/StartLoadInDidFailProvisionalLoad.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/StopLoadingFromDidFinishLoading.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/mac/WebScriptObjectDescription.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/WebViewCloseInsideDidFinishLoadForFrame.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/WebViewIconLoading.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/WillPerformClientRedirectToURLCrash.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Utilities.h: >+ * TestWebKitAPI/cocoa/TestNavigationDelegate.mm: >+ (-[TestNavigationDelegate waitForDidStartProvisionalNavigation]): >+ (-[TestNavigationDelegate waitForDidFinishNavigation]): >+ (-[WKWebView _test_waitForDidFinishNavigation]): >+ * TestWebKitAPI/cocoa/TestWKWebView.mm: >+ (-[WKWebView _synchronouslyExecuteEditCommand:argument:]): >+ (-[WKWebView objectByEvaluatingJavaScript:]): >+ (-[WKWebView objectByEvaluatingJavaScriptWithUserGesture:]): >+ (-[TestWKWebView waitForMessage:]): >+ (-[TestWKWebView waitForNextPresentationUpdate]): >+ (-[TestWKWebView selectionRectsAfterPresentationUpdate]): >+ (-[TestWKWebView activatedElementAtPosition:]): >+ * TestWebKitAPI/cocoa/UtilitiesCocoa.mm: >+ (TestWebKitAPI::Util::runUntil): >+ (TestWebKitAPI::Util::run): Deleted. >+ * TestWebKitAPI/generic/UtilitiesGeneric.cpp: >+ (TestWebKitAPI::Util::run): >+ * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: >+ (-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]): >+ (-[DragAndDropSimulator ensureInputSession]): >+ * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: >+ (-[DragAndDropTestWKWebView waitForPendingMouseEvents]): >+ (-[DragAndDropSimulator runFrom:to:]): >+ (-[DragAndDropSimulator receivePromisedFiles]): >+ * TestWebKitAPI/mac/WebKitAgnosticTest.mm: >+ (TestWebKitAPI::WebKitAgnosticTest::waitForLoadToFinish): >+ (TestWebKitAPI::WebKitAgnosticTest::waitForNextPresentationUpdate): >+ * TestWebKitAPI/win/UtilitiesWin.cpp: >+ (TestWebKitAPI::Util::run): >+ > 2019-05-20 Ludovico de Nittis <ludovico.denittis@collabora.com> > > [WPE][Qt] Use C++17 instead of C++14 >Index: Tools/TestWebKitAPI/EditingTestHarness.mm >=================================================================== >--- Tools/TestWebKitAPI/EditingTestHarness.mm (revision 245516) >+++ Tools/TestWebKitAPI/EditingTestHarness.mm (working copy) >@@ -188,7 +188,7 @@ - (void)_execCommand:(NSString *)command > result = success; > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > [_webView waitForNextPresentationUpdate]; > >Index: Tools/TestWebKitAPI/JavaScriptTest.cpp >=================================================================== >--- Tools/TestWebKitAPI/JavaScriptTest.cpp (revision 245516) >+++ Tools/TestWebKitAPI/JavaScriptTest.cpp (working copy) >@@ -72,7 +72,7 @@ static void javaScriptCallback(WKSeriali > { > JavaScriptCallbackContext context; > WKPageRunJavaScriptInMainFrame(page, Util::toWK(script).get(), &context, javaScriptCallback); >- Util::run(&context.didFinish); >+ runUntil(context.didFinish); > > size_t bufferSize = JSStringGetMaximumUTF8CStringSize(context.actualString.get()); > auto buffer = std::make_unique<char[]>(bufferSize); >Index: Tools/TestWebKitAPI/Utilities.h >=================================================================== >--- Tools/TestWebKitAPI/Utilities.h (revision 245516) >+++ Tools/TestWebKitAPI/Utilities.h (working copy) >@@ -26,10 +26,13 @@ > #pragma once > > namespace TestWebKitAPI { >-namespace Util { >+ >+#define HAVE_RUN_UNTIL 1 // Temporary to help not break build while changing to runUntil. > > // Runs a platform runloop until the 'done' flag is true. >-void run(bool* done); >+void runUntil(const bool& done); >+ >+namespace Util { > > // Runs a platform runloop `count` number of spins. > void spinRunLoop(uint64_t count = 1); >Index: Tools/TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm (working copy) >@@ -65,7 +65,7 @@ TEST(WebKit2CustomProtocolsTest, SyncXHR > > WKPageLoadURL(wkView.get().pageRef, Util::createURLForResource("custom-protocol-sync-xhr", "html")); > >- TestWebKitAPI::Util::run(&testFinished); >+ TestWebKitAPI::runUntil(testFinished); > [TestProtocol unregister]; > } > >Index: Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp (working copy) >@@ -549,9 +549,6 @@ TEST(WTF_RefPtr, ReleaseNonNullBeforeDer > EXPECT_STREQ("ref(a) slot=null deref(a) ", takeLogStr().c_str()); > } > >-// FIXME: Enable these tests once Win platform supports TestWebKitAPI::Util::run >-#if! PLATFORM(WIN) >- > static bool done; > static bool isDestroyedInMainThread; > struct ThreadSafeRefCountedObject : ThreadSafeRefCounted<ThreadSafeRefCountedObject> { >@@ -578,7 +575,7 @@ TEST(WTF_RefPtr, ReleaseInNonMainThread) > { > done = false; > Thread::create("", [object = ThreadSafeRefCountedObject::create()] { }); >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_FALSE(isDestroyedInMainThread); > } >@@ -588,11 +585,9 @@ TEST(WTF_RefPtr, ReleaseInNonMainThreadD > RunLoop::initializeMainRunLoop(); > done = false; > Thread::create("", [object = MainThreadSafeRefCountedObject::create()] { }); >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_TRUE(isDestroyedInMainThread); > } > >-#endif >- > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp (working copy) >@@ -52,7 +52,7 @@ TEST(WTF_RunLoop, Deadlock) > RunLoop::main().dispatch([capture] { }); > } > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > class DerivedOneShotTimer : public RunLoop::Timer<DerivedOneShotTimer> { >@@ -81,7 +81,7 @@ TEST(WTF_RunLoop, OneShotTimer) > bool testFinished = false; > DerivedOneShotTimer timer(testFinished); > timer.startOneShot(100_ms); >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > class DerivedRepeatingTimer : public RunLoop::Timer<DerivedRepeatingTimer> { >@@ -113,7 +113,7 @@ TEST(WTF_RunLoop, RepeatingTimer) > bool testFinished = false; > DerivedRepeatingTimer timer(testFinished); > timer.startRepeating(10_ms); >- Util::run(&testFinished); >+ runUntil(testFinished); > ASSERT_FALSE(timer.isActive()); > } > >Index: Tools/TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp (working copy) >@@ -59,7 +59,7 @@ TEST(AbortableTaskQueue, AsyncTasks) > WTF::Thread::create("atq-background", WTFMove(backgroundThreadFunction))->detach(); > }); > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > struct FancyResponse { >@@ -127,7 +127,7 @@ TEST(AbortableTaskQueue, SyncTasks) > WTF::Thread::create("atq-background", WTFMove(backgroundThreadFunction))->detach(); > }); > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > template <typename ThreadEnum> >@@ -233,7 +233,7 @@ TEST(AbortableTaskQueue, Abort) > mainThreadContext.yieldToThread(TestThread::Background); > }); > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > TEST(AbortableTaskQueue, AbortBeforeSyncTaskRun) >@@ -268,7 +268,7 @@ TEST(AbortableTaskQueue, AbortBeforeSync > taskQueue.startAborting(); > }); > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > TEST(AbortableTaskQueue, AbortedBySyncTaskHandler) >@@ -310,7 +310,7 @@ TEST(AbortableTaskQueue, AbortedBySyncTa > WTF::Thread::create("atq-background", WTFMove(backgroundThreadFunction))->detach(); > }); > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebCore/DNS.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebCore/DNS.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebCore/DNS.cpp (working copy) >@@ -58,7 +58,7 @@ TEST(DNSTest, cancelResolveDNS) > done = false; > resolveDNS(hostname, identifier, WTFMove(completionHandler)); > stopResolveDNS(identifier); >- Util::run(&done); >+ runUntil(done); > } > > TEST(DNSTest, cannotResolveDNS) >@@ -79,7 +79,7 @@ TEST(DNSTest, cannotResolveDNS) > > done = false; > resolveDNS(hostname, identifier, WTFMove(completionHandler)); >- Util::run(&done); >+ runUntil(done); > } > > TEST(DNSTest, resolveDNS) >@@ -99,7 +99,7 @@ TEST(DNSTest, resolveDNS) > > done = false; > resolveDNS(hostname, identifier, WTFMove(completionHandler)); >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp (working copy) >@@ -171,7 +171,7 @@ TEST_F(FileMonitorTest, DetectChange) > didFinish = true; > }); > >- Util::run(&didFinish); >+ runUntil(didFinish); > > EXPECT_TRUE(observedFileModification); > EXPECT_FALSE(observedFileDeletion); >@@ -213,7 +213,7 @@ TEST_F(FileMonitorTest, DetectMultipleCh > didFinish = true; > }); > >- Util::run(&didFinish); >+ runUntil(didFinish); > > EXPECT_TRUE(observedFileModification); > EXPECT_FALSE(observedFileDeletion); >@@ -231,7 +231,7 @@ TEST_F(FileMonitorTest, DetectMultipleCh > didFinish = true; > }); > >- Util::run(&didFinish); >+ runUntil(didFinish); > > EXPECT_TRUE(observedFileModification); > EXPECT_FALSE(observedFileDeletion); >@@ -273,7 +273,7 @@ TEST_F(FileMonitorTest, DetectDeletion) > didFinish = true; > }); > >- Util::run(&didFinish); >+ runUntil(didFinish); > > EXPECT_FALSE(observedFileModification); > EXPECT_TRUE(observedFileDeletion); >@@ -312,7 +312,7 @@ TEST_F(FileMonitorTest, DetectChangeAndT > didFinish = true; > }); > >- Util::run(&didFinish); >+ runUntil(didFinish); > > EXPECT_TRUE(observedFileModification); > EXPECT_FALSE(observedFileDeletion); >@@ -330,7 +330,7 @@ TEST_F(FileMonitorTest, DetectChangeAndT > didFinish = true; > }); > >- Util::run(&didFinish); >+ runUntil(didFinish); > > EXPECT_FALSE(observedFileModification); > EXPECT_TRUE(observedFileDeletion); >@@ -369,7 +369,7 @@ TEST_F(FileMonitorTest, DetectDeleteButN > didFinish = true; > }); > >- Util::run(&didFinish); >+ runUntil(didFinish); > > EXPECT_FALSE(observedFileModification); > EXPECT_TRUE(observedFileDeletion); >@@ -400,7 +400,7 @@ TEST_F(FileMonitorTest, DetectDeleteButN > didFinish = true; > }); > >- Util::run(&didFinish); >+ runUntil(didFinish); > > EXPECT_FALSE(observedFileModification); > EXPECT_FALSE(observedFileDeletion); >Index: Tools/TestWebKitAPI/Tests/WebCore/LineBreaking.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebCore/LineBreaking.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebCore/LineBreaking.mm (working copy) >@@ -89,7 +89,7 @@ static void testAFewStrings(Vector<Vecto > webkitLocations.append(floor([v floatValue] + 0.5)); > didEvaluateJavaScript = true; > }]; >- TestWebKitAPI::Util::run(&didEvaluateJavaScript); >+ TestWebKitAPI::runUntil(didEvaluateJavaScript); > > const auto& icuLocations = breakingLocationsFromICU(testCodePoints, locale, lineBreakValue); > EXPECT_EQ(icuLocations.size(), webkitLocations.size()); >Index: Tools/TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm (working copy) >@@ -121,7 +121,7 @@ public: > > didLoadMainResource = false; > view.mainFrameURL = documentURL.absoluteString; >- TestWebKitAPI::Util::run(&didLoadMainResource); >+ TestWebKitAPI::runUntil(didLoadMainResource); > > delegate = [[TestNSURLSessionDataDelegate alloc] init]; > frame = [view _mainCoreFrame]; >@@ -147,9 +147,9 @@ TEST_F(WebCoreNSURLSessionTest, BasicOpe > NSURLSessionDataTask *task = [session dataTaskWithURL:resourceURL]; > [task resume]; > >- TestWebKitAPI::Util::run(&didRecieveResponse); >- TestWebKitAPI::Util::run(&didRecieveData); >- TestWebKitAPI::Util::run(&didComplete); >+ TestWebKitAPI::runUntil(didRecieveResponse); >+ TestWebKitAPI::runUntil(didRecieveData); >+ TestWebKitAPI::runUntil(didComplete); > > didInvalidate = false; > >@@ -157,7 +157,7 @@ TEST_F(WebCoreNSURLSessionTest, BasicOpe > [task resume]; > [session finishTasksAndInvalidate]; > >- TestWebKitAPI::Util::run(&didInvalidate); >+ TestWebKitAPI::runUntil(didInvalidate); > > [session release]; > } >@@ -167,7 +167,7 @@ TEST_F(WebCoreNSURLSessionTest, Invalida > WebCoreNSURLSession* session = [[WebCoreNSURLSession alloc] initWithResourceLoader:*loader delegate:delegate delegateQueue:[NSOperationQueue mainQueue]]; > didInvalidate = false; > [session finishTasksAndInvalidate]; >- TestWebKitAPI::Util::run(&didInvalidate); >+ TestWebKitAPI::runUntil(didInvalidate); > [session release]; > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp (working copy) >@@ -56,7 +56,7 @@ TEST(WebKit, AboutBlankLoad) > > WKPageLoadURL(webView.page(), adoptWK(WKURLCreateWithUTF8CString("about:blank")).get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/CanHandleRequest.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/CanHandleRequest.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/CanHandleRequest.cpp (working copy) >@@ -69,7 +69,7 @@ TEST(WebKit, CanHandleRequest) > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple", "html")).get()); > > WKContextPostMessageToInjectedBundle(context.get(), Util::toWK("CheckCanHandleRequest").get(), 0); >- Util::run(&didReceiveMessage); >+ runUntil(didReceiveMessage); > EXPECT_TRUE(canHandleRequest); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp (working copy) >@@ -84,7 +84,7 @@ TEST(WebKit, CloseFromWithinCreatePage) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("close-from-within-create-page", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&testDone); >+ runUntil(testDone); > > openedWebView = nullptr; > } >Index: Tools/TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp (working copy) >@@ -58,7 +58,7 @@ TEST(WebKit, CloseThenTerminate) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&loaded); >+ runUntil(loaded); > > WKPageClose(webView.page()); > WKPageTerminate(webView.page()); >Index: Tools/TestWebKitAPI/Tests/WebKit/CookieManager.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/CookieManager.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/CookieManager.cpp (working copy) >@@ -85,7 +85,7 @@ TEST(WebKit, CookieManager) > > WKPageLoadURL(webView.page(), adoptWK(WKURLCreateWithUTF8CString("about:blank")).get()); > >- Util::run(&testDone); >+ runUntil(testDone); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp (working copy) >@@ -104,26 +104,26 @@ TEST(WebKit, DISABLED_DOMWindowExtension > WKRetainPtr<WKURLRef> url1 = adoptWK(Util::createURLForResource("simple-iframe", "html")); > WKPageLoadURL(webView.page(), url1.get()); > >- Util::run(&finished); >+ runUntil(finished); > finished = false; > > // Make sure those first 4 extensions are disconnected, and 2 new ones are installed. > WKRetainPtr<WKURLRef> url2 = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url2.get()); > >- Util::run(&finished); >+ runUntil(finished); > finished = false; > > // Make sure those two are disconnected, and the first four are reconnected. > WKPageGoBack(webView.page()); > >- Util::run(&finished); >+ runUntil(finished); > finished = false; > > // Make sure the 2 disconnected extensions in the page cache and the 4 active extensions are all removed. > WKPageClose(webView.page()); > >- Util::run(&finished); >+ runUntil(finished); > > const size_t expectedSize = sizeof(expectedMessages) / sizeof(const char*); > EXPECT_EQ(expectedSize, messages.size()); >@@ -161,11 +161,11 @@ TEST(WebKit, DOMWindowExtensionCrashOnRe > WKRetainPtr<WKURLRef> url1 = adoptWK(Util::createURLForResource("simple-iframe", "html")); > WKPageLoadURL(webView.page(), url1.get()); > >- Util::run(&finished); >+ runUntil(finished); > finished = false; > > WKPageReload(webView.page()); >- Util::run(&finished); >+ runUntil(finished); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp (working copy) >@@ -104,25 +104,25 @@ TEST(WebKit, DISABLED_DOMWindowExtension > WKRetainPtr<WKURLRef> url1 = adoptWK(Util::createURLForResource("simple-iframe", "html")); > WKPageLoadURL(webView.page(), url1.get()); > >- Util::run(&finished); >+ runUntil(finished); > finished = false; > > // Make sure those first 4 extensions are destroyed, and 2 new ones are installed. > WKRetainPtr<WKURLRef> url2 = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url2.get()); > >- Util::run(&finished); >+ runUntil(finished); > finished = false; > > // Make sure those 2 are destroyed, and the first 4 are recreated. > WKPageGoBack(webView.page()); > >- Util::run(&finished); >+ runUntil(finished); > finished = false; > > WKPageClose(webView.page()); > >- Util::run(&finished); >+ runUntil(finished); > > const size_t expectedSize = sizeof(expectedMessages) / sizeof(const char*); > EXPECT_EQ(expectedSize, messages.size()); >Index: Tools/TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm (working copy) >@@ -62,7 +62,7 @@ TEST(WebKit, DeferredViewInWindowStateCh > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("lots-of-text", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > EXPECT_JS_FALSE(webView.page(), "document.hidden"); >Index: Tools/TestWebKitAPI/Tests/WebKit/DidAssociateFormControls.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/DidAssociateFormControls.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/DidAssociateFormControls.cpp (working copy) >@@ -82,7 +82,7 @@ TEST(WebKit, DidAssociateFormControls) > > PlatformWebView webView(context.get()); > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("associate-form-controls", "html")).get()); >- Util::run(&didReceiveAllMessages); >+ runUntil(didReceiveAllMessages); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp (working copy) >@@ -62,7 +62,7 @@ TEST(WebKit, DidNotHandleKeyDown) > > webView.simulateSpacebarKeyPress(); > >- Util::run(&didFinishTest); >+ runUntil(didFinishTest); > EXPECT_TRUE(didNotHandleKeyDownEvent); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp (working copy) >@@ -82,20 +82,20 @@ TEST(WebKit, DidRemoveFrameFromHiearchyI > > finished = false; > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("many-iframes", "html")).get()); >- Util::run(&finished); >+ runUntil(finished); > > // Perform a couple of loads so "many-iframes" gets kicked out of the PageCache. > finished = false; > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple", "html")).get()); >- Util::run(&finished); >+ runUntil(finished); > > finished = false; > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple2", "html")).get()); >- Util::run(&finished); >+ runUntil(finished); > > finished = false; > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple3", "html")).get()); >- Util::run(&finished); >+ runUntil(finished); > > EXPECT_EQ(didRemoveFrameFromHierarchyCount, 10); > } >Index: Tools/TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash.cpp (working copy) >@@ -64,7 +64,7 @@ TEST(WebKit, DocumentStartUserScriptAler > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/DownloadDecideDestinationCrash.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/DownloadDecideDestinationCrash.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/DownloadDecideDestinationCrash.cpp (working copy) >@@ -82,7 +82,7 @@ TEST(WebKit, DownloadDecideDestinationCr > // to be equal after the DecideDestinationWithSuggestedFilename message has been handled. > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("18-characters", "html")).get()); > >- Util::run(&didDecideDestination); >+ runUntil(didDecideDestination); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/EnumerateMediaDevices.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/EnumerateMediaDevices.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/EnumerateMediaDevices.cpp (working copy) >@@ -69,12 +69,12 @@ TEST(WebKit, EnumerateDevices) > > // Load and kill the page. > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&loadedFirstTime); >+ runUntil(loadedFirstTime); > WKPageTerminate(webView.page()); > > // Load it again to make sure the user media process manager doesn't assert. > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&loadedSecondTime); >+ runUntil(loadedSecondTime); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp (working copy) >@@ -86,7 +86,7 @@ TEST(WebKit, EphemeralSessionPushStateNo > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("push-state", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&testDone); >+ runUntil(testDone); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/EvaluateJavaScript.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/EvaluateJavaScript.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/EvaluateJavaScript.cpp (working copy) >@@ -57,7 +57,7 @@ TEST(WebKit, EvaluateJavaScriptThatThrow > WKRetainPtr<WKStringRef> javaScriptString = adoptWK(WKStringCreateWithUTF8CString("throw 'Hello'")); > WKPageRunJavaScriptInMainFrame(webView.page(), javaScriptString.get(), reinterpret_cast<void*>(0x1234578), didRunJavaScript); > >- Util::run(&testDone); >+ runUntil(testDone); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/EventModifiers.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/EventModifiers.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/EventModifiers.cpp (working copy) >@@ -71,10 +71,10 @@ TEST(WebKit, EventModifiers) > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > webView.simulateMouseMove(10, 10, kWKEventModifiersControlKey); >- Util::run(&mouseMoveCallbackFinished); >+ runUntil(mouseMoveCallbackFinished); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/FailedLoad.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/FailedLoad.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/FailedLoad.cpp (working copy) >@@ -65,7 +65,7 @@ TEST(WebKit, FailedLoad) > WKRetainPtr<WKURLRef> url = adoptWK(Util::URLForNonExistentResource()); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&testDone); >+ runUntil(testDone); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/Find.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/Find.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/Find.cpp (working copy) >@@ -73,12 +73,12 @@ TEST(WebKit, Find) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("find", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > WKRetainPtr<WKStringRef> findString = adoptWK(WKStringCreateWithUTF8CString("Hello")); > WKPageCountStringMatches(webView.page(), findString.get(), true, 100); > >- Util::run(&didCallCountStringMatches); >+ runUntil(didCallCountStringMatches); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/FindMatches.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/FindMatches.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/FindMatches.mm (working copy) >@@ -143,17 +143,17 @@ TEST(WebKit, FindMatches) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("findRanges", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > WKRetainPtr<WKStringRef> findString = adoptWK(WKStringCreateWithUTF8CString("Hello")); > > WKPageFindStringMatches(webView.page(), findString.get(), findOptions, 100); >- Util::run(&didCallFindStringMatches); >+ runUntil(didCallFindStringMatches); > > didCallFindStringMatches = false; > findOptions |= kWKFindOptionsBackwards; > WKPageFindStringMatches(webView.page(), findString.get(), findOptions, 100); >- Util::run(&didCallFindStringMatches); >+ runUntil(didCallFindStringMatches); > > webkit1View = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]); > RetainPtr<FindMatchesWK1FrameLoadDelegate> frameLoadDelegate = adoptNS([FindMatchesWK1FrameLoadDelegate new]); >@@ -161,16 +161,16 @@ TEST(WebKit, FindMatches) > webkit1View.get().frameLoadDelegate = frameLoadDelegate.get(); > [webkit1View.get().mainFrame loadHTMLString:@"Test search. Hello <span id=\"target\">Hello</span> Hello!" baseURL:[NSURL URLWithString:@"about:blank"]]; > >- Util::run(&didFinishLoadWK1); >+ runUntil(didFinishLoadWK1); > > WKPageGetImageForFindMatch(webView.page(), 0); >- Util::run(&didCallGetImage); >+ runUntil(didCallGetImage); > > didCallFindStringMatches = false; > findOptions &= ~kWKFindOptionsBackwards; > WKRetainPtr<WKStringRef> findOtherString = adoptWK(WKStringCreateWithUTF8CString("crazy")); > WKPageFindStringMatches(webView.page(), findOtherString.get(), findOptions, 100); >- Util::run(&didCallFindStringMatches); >+ runUntil(didCallFindStringMatches); > > WKPageHideFindUI(webView.page()); > } >Index: Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp (working copy) >@@ -61,7 +61,7 @@ TEST(WebKit, FirstMeaningfulPaint) > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("lots-of-text", "html")).get()); > >- Util::run(&didUnlockFistMeaningfulPaintMilestone); >+ runUntil(didUnlockFistMeaningfulPaintMilestone); > EXPECT_TRUE(didUnlockFistMeaningfulPaintMilestone); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/FirstVisuallyNonEmptyMilestoneWithDeferredScript.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/FirstVisuallyNonEmptyMilestoneWithDeferredScript.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/FirstVisuallyNonEmptyMilestoneWithDeferredScript.mm (working copy) >@@ -68,6 +68,6 @@ TEST(WebKit, FirstVisuallyNonEmptyMilest > > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"deferred-script-load" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > EXPECT_TRUE(didFirstVisuallyNonEmptyLayout); > } >Index: Tools/TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp (working copy) >@@ -65,8 +65,8 @@ TEST(WebKit, ForceRepaint) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple-accelerated-compositing", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&test1Done); >- Util::run(&test2Done); >+ runUntil(test1Done); >+ runUntil(test2Done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/FrameHandle.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/FrameHandle.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/FrameHandle.cpp (working copy) >@@ -55,7 +55,7 @@ TEST(WebKit, FrameHandle) > WKPageSetPageNavigationClient(webView.page(), &loaderClient.base); > > WKPageLoadURL(webView.page(), adoptWK(WKURLCreateWithUTF8CString("about:blank")).get()); >- Util::run(&done); >+ runUntil(done); > > auto frame = WKPageGetMainFrame(webView.page()); > auto frameInfo = adoptWK(WKFrameCreateFrameInfo(frame)); >Index: Tools/TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp (working copy) >@@ -74,7 +74,7 @@ TEST(WebKit, FrameMIMETypeHTML) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&testDone); >+ runUntil(testDone); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp (working copy) >@@ -73,7 +73,7 @@ TEST(WebKit, FrameMIMETypePNG) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("icon", "png")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&testDone); >+ runUntil(testDone); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/Geolocation.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/Geolocation.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/Geolocation.cpp (working copy) >@@ -172,7 +172,7 @@ TEST(WebKit, GeolocationBasic) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("geolocationGetCurrentPosition", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&stateTracker.finished); >+ runUntil(stateTracker.finished); > clearGeolocationProvider(context.get()); > } > >@@ -214,7 +214,7 @@ TEST(WebKit, GeolocationBasicWithHighAcc > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("geolocationGetCurrentPositionWithHighAccuracy", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&stateTracker.finished); >+ runUntil(stateTracker.finished); > clearGeolocationProvider(context.get()); > } > >@@ -265,19 +265,19 @@ TEST(WebKit, GeolocationTransitionToHigh > setupView(lowAccuracyWebView); > WKRetainPtr<WKURLRef> lowAccuracyURL = adoptWK(Util::createURLForResource("geolocationWatchPosition", "html")); > WKPageLoadURL(lowAccuracyWebView.page(), lowAccuracyURL.get()); >- Util::run(&stateTracker.finishedFirstStep); >+ runUntil(stateTracker.finishedFirstStep); > > PlatformWebView highAccuracyWebView(lowAccuracyWebView.page()); > setupView(highAccuracyWebView); > WKRetainPtr<WKURLRef> highAccuracyURL = adoptWK(Util::createURLForResource("geolocationWatchPositionWithHighAccuracy", "html")); > WKPageLoadURL(highAccuracyWebView.page(), highAccuracyURL.get()); >- Util::run(&stateTracker.enabledHighAccuracy); >+ runUntil(stateTracker.enabledHighAccuracy); > > WKRetainPtr<WKURLRef> resetUrl = adoptWK(WKURLCreateWithUTF8CString("about:blank")); > WKPageLoadURL(highAccuracyWebView.page(), resetUrl.get()); >- Util::run(&stateTracker.enabledHighAccuracy); >+ runUntil(stateTracker.enabledHighAccuracy); > WKPageLoadURL(lowAccuracyWebView.page(), resetUrl.get()); >- Util::run(&stateTracker.finished); >+ runUntil(stateTracker.finished); > > clearGeolocationProvider(context.get()); > } >@@ -338,7 +338,7 @@ TEST(WebKit, GeolocationTransitionToLowA > setupView(highAccuracyWebView); > WKRetainPtr<WKURLRef> highAccuracyURL = adoptWK(Util::createURLForResource("geolocationWatchPositionWithHighAccuracy", "html")); > WKPageLoadURL(highAccuracyWebView.page(), highAccuracyURL.get()); >- Util::run(&stateTracker.finishedFirstStep); >+ runUntil(stateTracker.finishedFirstStep); > > PlatformWebView lowAccuracyWebView(context.get()); > setupView(lowAccuracyWebView); >@@ -355,16 +355,16 @@ TEST(WebKit, GeolocationTransitionToLowA > > WKRetainPtr<WKURLRef> lowAccuracyURL = adoptWK(Util::createURLForResource("geolocationWatchPosition", "html")); > WKPageLoadURL(lowAccuracyWebView.page(), lowAccuracyURL.get()); >- Util::run(&secondStepContext.didRun); >+ runUntil(secondStepContext.didRun); > EXPECT_EQ(secondStepContext.alertText, "SUCCESS"); > > WKRetainPtr<WKURLRef> resetUrl = adoptWK(WKURLCreateWithUTF8CString("about:blank")); > WKPageLoadURL(highAccuracyWebView.page(), resetUrl.get()); > >- Util::run(&stateTracker.disabledHighAccuracy); >+ runUntil(stateTracker.disabledHighAccuracy); > > WKPageLoadURL(lowAccuracyWebView.page(), resetUrl.get()); >- Util::run(&stateTracker.finished); >+ runUntil(stateTracker.finished); > > clearGeolocationProvider(context.get()); > } >@@ -389,7 +389,7 @@ TEST(WebKit, GeolocationWatchMultiproces > WKPageSetPageUIClient(view1.page(), &uiClient.base); > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("geolocationWatchPosition", "html")); > WKPageLoadURL(view1.page(), url.get()); >- Util::run(&testContext.didRun); >+ runUntil(testContext.didRun); > EXPECT_EQ(testContext.alertText, "SUCCESS"); > WKPageSetPageUIClient(view1.page(), nullptr); > >@@ -399,7 +399,7 @@ TEST(WebKit, GeolocationWatchMultiproces > PlatformWebView view2(context.get()); > WKPageSetPageUIClient(view2.page(), &uiClient.base); > WKPageLoadURL(view2.page(), url.get()); >- Util::run(&testContext.didRun); >+ runUntil(testContext.didRun); > EXPECT_EQ(testContext.alertText, "SUCCESS"); > > clearGeolocationProvider(context.get()); >Index: Tools/TestWebKitAPI/Tests/WebKit/GetInjectedBundleInitializationUserDataCallback.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/GetInjectedBundleInitializationUserDataCallback.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/GetInjectedBundleInitializationUserDataCallback.cpp (working copy) >@@ -64,7 +64,7 @@ TEST(WebKit, GetInjectedBundleInitializa > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm (working copy) >@@ -79,7 +79,7 @@ TEST(WebKit, NavigateDuringGetUserMediaP > > shouldReleaseInEnumerate = false; > [webView loadTestPageNamed:@"getUserMedia"]; >- TestWebKitAPI::Util::run(&okToProceed); >+ TestWebKitAPI::runUntil(okToProceed); > } > > TEST(WebKit, NavigateDuringDeviceEnumeration) >@@ -96,7 +96,7 @@ TEST(WebKit, NavigateDuringDeviceEnumera > > shouldReleaseInEnumerate = true; > [webView loadTestPageNamed:@"enumerateMediaDevices"]; >- TestWebKitAPI::Util::run(&okToProceed); >+ TestWebKitAPI::runUntil(okToProceed); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm (working copy) >@@ -92,7 +92,7 @@ TEST(WebKit2, GetUserMediaReprompt) > > wasPrompted = false; > [webView loadTestPageNamed:@"getUserMedia"]; >- TestWebKitAPI::Util::run(&wasPrompted); >+ TestWebKitAPI::runUntil(wasPrompted); > > EXPECT_TRUE([webView haveStream:YES]); > >@@ -113,7 +113,7 @@ TEST(WebKit2, GetUserMediaReprompt) > > wasPrompted = false; > [webView stringByEvaluatingJavaScript:@"promptForCapture()"]; >- TestWebKitAPI::Util::run(&wasPrompted); >+ TestWebKitAPI::runUntil(wasPrompted); > EXPECT_TRUE([webView haveStream:YES]); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp (working copy) >@@ -81,11 +81,11 @@ TEST(WebKit, HitTestResultNodeHandle) > setPageLoaderClient(webView.page()); > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple", "html")).get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > webView.simulateRightClick(10, 10); >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp (working copy) >@@ -76,7 +76,7 @@ TEST(WebKit, InjectedBundleBasic) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp (working copy) >@@ -68,7 +68,7 @@ TEST(WebKit, InjectedBundleNoDisableOver > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("override-builtins-test", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > static void runJavaScriptAlertDisabled(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo) >@@ -102,7 +102,7 @@ TEST(WebKit, InjectedBundleDisableOverri > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("override-builtins-test", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleFrameHitTest.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleFrameHitTest.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleFrameHitTest.cpp (working copy) >@@ -65,7 +65,7 @@ TEST(WebKit, InjectedBundleFrameHitTest) > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("link-with-title", "html")).get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleInitializationUserDataCallbackWins.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleInitializationUserDataCallbackWins.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleInitializationUserDataCallbackWins.cpp (working copy) >@@ -66,7 +66,7 @@ TEST(WebKit, InjectedBundleInitializatio > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen.cpp (working copy) >@@ -101,7 +101,7 @@ TEST(WebKit, InjectedBundleMakeAllShadow > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("closed-shadow-tree-test", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp (working copy) >@@ -68,7 +68,7 @@ TEST(WebKit, LayoutMilestonesWithAllCont > WKPageListenForLayoutMilestones(webView.page(), WKPageRenderingProgressEventFirstVisuallyNonEmptyLayout); > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("all-content-in-one-iframe", "html")).get()); > >- Util::run(&didFirstVisuallyNonEmptyLayout); >+ runUntil(didFirstVisuallyNonEmptyLayout); > EXPECT_TRUE(didFirstVisuallyNonEmptyLayout); > } > >@@ -93,26 +93,26 @@ TEST(WebKit, FirstVisuallyNonEmptyLayout > WKPageListenForLayoutMilestones(webView.page(), WKPageRenderingProgressEventFirstVisuallyNonEmptyLayout); > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple-tall", "html")).get()); > >- Util::run(&didFirstVisuallyNonEmptyLayout); >+ runUntil(didFirstVisuallyNonEmptyLayout); > EXPECT_TRUE(didFirstVisuallyNonEmptyLayout); > didFirstVisuallyNonEmptyLayout = false; >- Util::run(&didNavigate); >+ runUntil(didNavigate); > EXPECT_TRUE(didNavigate); > didNavigate = false; > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("large-red-square-image", "html")).get()); >- Util::run(&didFirstVisuallyNonEmptyLayout); >+ runUntil(didFirstVisuallyNonEmptyLayout); > EXPECT_TRUE(didFirstVisuallyNonEmptyLayout); > didFirstVisuallyNonEmptyLayout = false; >- Util::run(&didNavigate); >+ runUntil(didNavigate); > EXPECT_TRUE(didNavigate); > didNavigate = false; > > WKPageGoBack(webView.page()); >- Util::run(&didFirstVisuallyNonEmptyLayout); >+ runUntil(didFirstVisuallyNonEmptyLayout); > EXPECT_TRUE(didFirstVisuallyNonEmptyLayout); > didFirstVisuallyNonEmptyLayout = false; >- Util::run(&didNavigate); >+ runUntil(didNavigate); > EXPECT_TRUE(didNavigate); > didNavigate = false; > } >@@ -135,7 +135,7 @@ TEST(WebKit, FirstVisuallyNonEmptyMilest > WKPageListenForLayoutMilestones(webView.page(), WKPageRenderingProgressEventFirstVisuallyNonEmptyLayout); > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("async-script-load", "html")).get()); > >- Util::run(&didFirstVisuallyNonEmptyLayout); >+ runUntil(didFirstVisuallyNonEmptyLayout); > EXPECT_TRUE(didFirstVisuallyNonEmptyLayout); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp (working copy) >@@ -61,7 +61,7 @@ static void loadAlternateHTMLString(WKUR > WKPageLoadAlternateHTMLString(webView.page(), alternateHTMLString.get(), baseURL, unreachableURL); > > // If we can finish loading the html without resulting in an invalid message being sent from the WebProcess, this test passes. >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > } > > TEST(WebKit, LoadAlternateHTMLStringWithNonDirectoryURL) >Index: Tools/TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp (working copy) >@@ -82,7 +82,7 @@ TEST(WebKit, LoadCanceledNoServerRedirec > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple-iframe", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&loadedAllFrames); >+ runUntil(loadedAllFrames); > > // We shouldn't have performed a server redirect when the iframe load was cancelled. > EXPECT_FALSE(performedServerRedirect); >Index: Tools/TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp (working copy) >@@ -99,10 +99,10 @@ TEST(WebKit, LoadPageAfterCrash) > { > WebKit2CrashLoader helper; > helper.loadUrl(); >- Util::run(&helper.firstSuccessfulLoad); >+ runUntil(helper.firstSuccessfulLoad); > helper.terminateWebProcess(); > helper.loadUrl(); >- Util::run(&helper.secondSuccessfulLoad); >+ runUntil(helper.secondSuccessfulLoad); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm (working copy) >@@ -77,7 +77,7 @@ TEST(WebKit, MediaStreamTrackDetached) > hasRecievedCorrectCaptureState = false; > [webView loadTestPageNamed:@"mediastreamtrack-detached"]; > >- TestWebKitAPI::Util::run(&hasRecievedCorrectCaptureState); >+ TestWebKitAPI::runUntil(hasRecievedCorrectCaptureState); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp (working copy) >@@ -59,7 +59,7 @@ static void buildAndPerformTest(WKEventM > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("mouse-button-listener", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > didFinishLoad = false; > >Index: Tools/TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp (working copy) >@@ -136,7 +136,7 @@ TEST(WebKit, ModalAlertsSPI) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("modal-alerts-in-new-about-blank-window", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp (working copy) >@@ -60,7 +60,7 @@ TEST(WebKit, MouseMoveAfterCrash) > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("mouse-move-listener", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > didFinishLoad = false; > >@@ -77,7 +77,7 @@ TEST(WebKit, MouseMoveAfterCrash) > WKPageReload(webView.page()); > > // Wait until we load the page a second time. >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_JS_FALSE(webView.page(), "didMoveMouse()"); > >Index: Tools/TestWebKitAPI/Tests/WebKit/NavigationClientDefaultCrypto.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/NavigationClientDefaultCrypto.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/NavigationClientDefaultCrypto.cpp (working copy) >@@ -79,11 +79,11 @@ TEST(WebKit, NavigationClientDefaultCryp > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("navigation-client-default-crypto", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&receivedAlert); >+ runUntil(receivedAlert); > EXPECT_TRUE(WKStringIsEqualToUTF8CString(lastAlert.get(), "successfully stored key")); > > receivedAlert = false; >- Util::run(&receivedAlert); >+ runUntil(receivedAlert); > EXPECT_TRUE(WKStringIsEqualToUTF8CString(lastAlert.get(), "retrieved valid key")); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/NetworkProcessCrashWithPendingConnection.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/NetworkProcessCrashWithPendingConnection.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/NetworkProcessCrashWithPendingConnection.mm (working copy) >@@ -90,7 +90,7 @@ TEST(WebKit, NetworkProcessCrashWithPend > pid_t initialNetworkProcessIdentififer = [processPool.get() _networkProcessIdentifier]; > EXPECT_NE(initialNetworkProcessIdentififer, 0); > kill(initialNetworkProcessIdentififer, SIGKILL); >- Util::run(&networkProcessCrashed); >+ runUntil(networkProcessCrashed); > networkProcessCrashed = false; > > [webView1.get() loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >@@ -105,7 +105,7 @@ TEST(WebKit, NetworkProcessCrashWithPend > [webView2.get() loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > Util::sleep(0.5); // Wait for the WebContent process to send CreateNetworkConnectionToWebProcess > kill(relaunchedNetworkProcessIdentifier, SIGKILL); >- Util::run(&networkProcessCrashed); >+ runUntil(networkProcessCrashed); > > auto navigationDelegate = adoptNS([[TestNavigationDelegate alloc] init]); > loadedOrCrashed = false; >@@ -118,7 +118,7 @@ TEST(WebKit, NetworkProcessCrashWithPend > webProcessCrashed = true; > }]; > [webView2 setNavigationDelegate:navigationDelegate.get()]; >- TestWebKitAPI::Util::run(&loadedOrCrashed); >+ TestWebKitAPI::runUntil(loadedOrCrashed); > EXPECT_TRUE(loaded); > EXPECT_FALSE(webProcessCrashed); > } >@@ -153,7 +153,7 @@ TEST(WebKit, NetworkProcessRelaunchOnLau > [webView setNavigationDelegate:delegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- TestWebKitAPI::Util::run(&loaded); >+ TestWebKitAPI::runUntil(loaded); > > EXPECT_TRUE(networkProcessCrashed); > EXPECT_FALSE(webProcessCrashed); >Index: Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp (working copy) >@@ -84,7 +84,7 @@ TEST(WebKit, DISABLED_NewFirstVisuallyNo > // objects take up more than 10% of the view. > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("lots-of-text", "html")).get()); > >- Util::run(&didUnlockAllLayoutMilestones); >+ runUntil(didUnlockAllLayoutMilestones); > EXPECT_TRUE(didUnlockAllLayoutMilestones); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp (working copy) >@@ -80,8 +80,8 @@ TEST(WebKit, NewFirstVisuallyNonEmptyLay > // objects take up less than 10% of the view. > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple", "html")).get()); > >- Util::run(&test1Done); >- Util::run(&test2Done); >+ runUntil(test1Done); >+ runUntil(test2Done); > > // By the time the forced repaint has finished, the counter would have been hit > // if it was sized reasonably for the page. >Index: Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp (working copy) >@@ -84,7 +84,7 @@ TEST(WebKit, DISABLED_NewFirstVisuallyNo > // objects take up more than 10% of the view. > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("lots-of-images", "html")).get()); > >- Util::run(&didUnlockAllLayoutMilestones); >+ runUntil(didUnlockAllLayoutMilestones); > EXPECT_TRUE(didUnlockAllLayoutMilestones); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp (working copy) >@@ -84,8 +84,8 @@ TEST(WebKit, NewFirstVisuallyNonEmptyLay > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("lots-of-iframes", "html")).get()); > >- Util::run(&test1Done); >- Util::run(&test2Done); >+ runUntil(test1Done); >+ runUntil(test2Done); > > // By the time the forced repaint has finished, the counter would have been hit > // if it was sized reasonably for the page. >Index: Tools/TestWebKitAPI/Tests/WebKit/NoHistoryItemScrollToFragment.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/NoHistoryItemScrollToFragment.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/NoHistoryItemScrollToFragment.mm (working copy) >@@ -88,7 +88,7 @@ TEST(WebKit, NoHistoryItemScrollToFragme > NSString *testFileContents = [NSString stringWithContentsOfURL:resourceURL encoding:NSUTF8StringEncoding error:nil]; > [webView synchronouslyLoadHTMLString:testFileContents]; > >- TestWebKitAPI::Util::run(&testDone); >+ TestWebKitAPI::runUntil(testDone); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp (working copy) >@@ -135,7 +135,7 @@ TEST(WebKit, PageLoadBasic) > ASSERT_NOT_NULL(activeUrl.get()); > EXPECT_TRUE(WKURLIsEqual(activeUrl.get(), url.get())); > >- Util::run(&test1Done); >+ runUntil(test1Done); > } > > TEST(WebKit, PageReload) >@@ -188,7 +188,7 @@ TEST(WebKit, PageLoadTwiceAndReload) > WKPageLoadURL(webView.page(), url1.get()); > WKPageLoadURL(webView.page(), url2.get()); > >- Util::run(&test1Done); >+ runUntil(test1Done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp (working copy) >@@ -72,12 +72,12 @@ TEST(WebKit, PageLoadDidChangeLocationWi > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("file-with-anchor", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > WKRetainPtr<WKURLRef> initialURL = adoptWK(WKFrameCopyURL(WKPageGetMainFrame(webView.page()))); > > WKPageRunJavaScriptInMainFrame(webView.page(), Util::toWK("clickLink()").get(), 0, nullJavaScriptCallback); >- Util::run(&didChangeLocationWithinPage); >+ runUntil(didChangeLocationWithinPage); > > WKRetainPtr<WKURLRef> urlAfterAnchorClick = adoptWK(WKFrameCopyURL(WKPageGetMainFrame(webView.page()))); > >Index: Tools/TestWebKitAPI/Tests/WebKit/ParentFrame.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ParentFrame.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ParentFrame.cpp (working copy) >@@ -66,7 +66,7 @@ TEST(WebKit, ParentFrame) > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple-iframe", "html")).get()); > >- Util::run(&didReceiveMessage); >+ runUntil(didReceiveMessage); > EXPECT_TRUE(isParentFrameCheckSuccessful); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/PasteboardNotifications.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/PasteboardNotifications.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/PasteboardNotifications.mm (working copy) >@@ -74,7 +74,7 @@ TEST(WebKit, PasteboardNotifications) > WKPageGroupSetPreferences(pageGroup, preferences.get()); > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("execCopy", "html")).get()); >- Util::run(&finished); >+ runUntil(finished); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp (working copy) >@@ -57,14 +57,14 @@ TEST(WebKit, PendingAPIRequestURL) > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKPageReload(webView.page()); > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKRetainPtr<WKStringRef> htmlString = Util::toWK("<body>Hello, World</body>"); >@@ -73,14 +73,14 @@ TEST(WebKit, PendingAPIRequestURL) > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), blankURL.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKPageReload(webView.page()); > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), blankURL.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > url = adoptWK(Util::createURLForResource("simple2", "html")); >@@ -88,14 +88,14 @@ TEST(WebKit, PendingAPIRequestURL) > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKPageReload(webView.page()); > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKRetainPtr<WKDataRef> data = adoptWK(WKDataCreate(nullptr, 0)); >@@ -103,42 +103,42 @@ TEST(WebKit, PendingAPIRequestURL) > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), blankURL.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKPageReload(webView.page()); > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), blankURL.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKPageLoadData(webView.page(), data.get(), nullptr, nullptr, url.get()); > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKPageReload(webView.page()); > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKPageLoadAlternateHTMLString(webView.page(), htmlString.get(), nullptr, url.get()); > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKPageReload(webView.page()); > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKRetainPtr<WKStringRef> plainTextString = Util::toWK("Hello, World"); >@@ -146,14 +146,14 @@ TEST(WebKit, PendingAPIRequestURL) > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), blankURL.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > WKPageReload(webView.page()); > activeURL = adoptWK(WKPageCopyActiveURL(webView.page())); > ASSERT_NOT_NULL(activeURL.get()); > EXPECT_TRUE(WKURLIsEqual(activeURL.get(), blankURL.get())); >- Util::run(&done); >+ runUntil(done); > done = false; > > url = adoptWK(WKURLCreateWithUTF8CString("file:///tmp/index.html")); >Index: Tools/TestWebKitAPI/Tests/WebKit/PreventEmptyUserAgent.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/PreventEmptyUserAgent.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/PreventEmptyUserAgent.cpp (working copy) >@@ -67,7 +67,7 @@ TEST(WebKit, PreventEmptyUserAgent) > WKRetainPtr<WKStringRef> javaScriptString = adoptWK(WKStringCreateWithUTF8CString("navigator.userAgent")); > WKPageRunJavaScriptInMainFrame(webView.page(), javaScriptString.get(), reinterpret_cast<void*>(0x1234578), didRunJavaScript); > >- Util::run(&testDone); >+ runUntil(testDone); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp (working copy) >@@ -83,7 +83,7 @@ TEST(WebKit, PrivateBrowsingPushStateNoH > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("push-state", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&didSameDocumentNavigation); >+ runUntil(didSameDocumentNavigation); > > WKPreferencesSetPrivateBrowsingEnabled(preferences.get(), false); > >@@ -92,7 +92,7 @@ TEST(WebKit, PrivateBrowsingPushStateNoH > > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&didNavigate); >+ runUntil(didNavigate); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/ProcessDidTerminate.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ProcessDidTerminate.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ProcessDidTerminate.cpp (working copy) >@@ -93,11 +93,11 @@ TEST(WebKit, ProcessDidTerminateRequeste > WKRetainPtr<WKURLRef> url = adoptWK(WKURLCreateWithUTF8CString("about:blank")); > // Load a blank page and next kills WebProcess. > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&loadBeforeCrash); >+ runUntil(loadBeforeCrash); > > WKPageTerminate(webView.page()); > >- Util::run(&clientTerminationHandlerCalled); >+ runUntil(clientTerminationHandlerCalled); > } > > TEST(WebKit, ProcessDidTerminateWithReasonCrash) >@@ -117,12 +117,12 @@ TEST(WebKit, ProcessDidTerminateWithReas > WKRetainPtr<WKURLRef> url = adoptWK(WKURLCreateWithUTF8CString("about:blank")); > // Load a blank page and next kills WebProcess. > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&loadBeforeCrash); >+ runUntil(loadBeforeCrash); > > // Simulate a crash by killing the WebProcess. > kill(WKPageGetProcessIdentifier(webView.page()), SIGKILL); > >- Util::run(&crashHandlerCalled); >+ runUntil(crashHandlerCalled); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/ProvisionalURLAfterWillSendRequestCallback.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ProvisionalURLAfterWillSendRequestCallback.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ProvisionalURLAfterWillSendRequestCallback.cpp (working copy) >@@ -80,7 +80,7 @@ TEST(WebKit2, ProvisionalURLAfterWillSen > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&committedLoad); >+ runUntil(committedLoad); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp (working copy) >@@ -83,12 +83,12 @@ TEST(WebKit, ReloadPageAfterCrash) > WKRetainPtr<WKURLRef> url = adoptWK(WKURLCreateWithUTF8CString("about:blank")); > // Load a blank page and next kills WebProcess. > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&loadBeforeCrash); >+ runUntil(loadBeforeCrash); > WKPageTerminate(webView.page()); > > // Let's try load a page and see what happens. > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&loadAfterCrash); >+ runUntil(loadAfterCrash); > } > > #if !PLATFORM(WIN) >@@ -125,7 +125,7 @@ TEST(WebKit, FocusedFrameAfterCrash) > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("many-iframes", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&loadBeforeCrash); >+ runUntil(loadBeforeCrash); > > EXPECT_FALSE(!WKPageGetMainFrame(webView.page())); > >@@ -137,7 +137,7 @@ TEST(WebKit, FocusedFrameAfterCrash) > > kill(WKPageGetProcessIdentifier(webView.page()), 9); > >- Util::run(&calledCrashHandler); >+ runUntil(calledCrashHandler); > } > > TEST(WebKit, FrameSetLargestFrameAfterCrash) >@@ -158,7 +158,7 @@ TEST(WebKit, FrameSetLargestFrameAfterCr > WKRetainPtr<WKStringRef> htmlString = Util::toWK("<frameset cols='25%,*,25%'><frame src='about:blank'><frame src='about:blank'><frame src='about:blank'></frameset>"); > > WKPageLoadHTMLString(webView.page(), htmlString.get(), baseURL.get()); >- Util::run(&loadBeforeCrash); >+ runUntil(loadBeforeCrash); > > EXPECT_FALSE(!WKPageGetMainFrame(webView.page())); > >@@ -167,7 +167,7 @@ TEST(WebKit, FrameSetLargestFrameAfterCr > > kill(WKPageGetProcessIdentifier(webView.page()), 9); > >- Util::run(&calledCrashHandler); >+ runUntil(calledCrashHandler); > } > > #endif // !PLATFORM(WIN) >Index: Tools/TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp (working copy) >@@ -86,7 +86,7 @@ TEST(WebKit, ResizeReversePaginatedWebVi > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("lots-of-text-vertical-lr", "html")).get()); > >- Util::run(&testDone); >+ runUntil(testDone); > EXPECT_TRUE(testDone); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp (working copy) >@@ -91,12 +91,12 @@ TEST(WebKit, ResizeWindowAfterCrash) > WKRetainPtr<WKURLRef> url = adoptWK(WKURLCreateWithUTF8CString("about:blank")); > // Load a blank page and next kills WebProcess. > WKPageLoadURL(states.webView.page(), url.get()); >- Util::run(&states.firstLoad); >+ runUntil(states.firstLoad); > WKPageTerminate(states.webView.page()); > > // Let's try load a page and see what happens. > WKPageLoadURL(states.webView.page(), url.get()); >- Util::run(&states.resizeAfterCrash); >+ runUntil(states.resizeAfterCrash); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm (working copy) >@@ -86,7 +86,7 @@ TEST(WebKit, ResponsivenessTimerCrash) > [webView typeCharacter:'a']; > } > >- Util::run(&didBecomeUnresponsive); >+ runUntil(didBecomeUnresponsive); > > [webView removeObserver:observer.get() forKeyPath:@"_webProcessIsResponsive"]; > } >Index: Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp (working copy) >@@ -76,7 +76,7 @@ static WKRetainPtr<WKDataRef> createSess > setPageLoaderClient(webView.page()); > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple-form", "html")).get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > auto sessionState = adoptWK(static_cast<WKSessionStateRef>(WKPageCopySessionState(webView.page(), reinterpret_cast<void*>(1), nullptr))); >@@ -96,7 +96,7 @@ TEST(WebKit, RestoreSessionStateContaini > auto sessionState = adoptWK(WKSessionStateCreateFromData(data.get())); > WKPageRestoreFromSessionState(webView.page(), sessionState.get()); > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_JS_EQ(webView.page(), "history.scrollRestoration", "auto"); > } >@@ -121,7 +121,7 @@ TEST(WebKit, RestoreSessionStateContaini > auto sessionState = adoptWK(WKSessionStateCreateFromData(data.get())); > WKPageRestoreFromSessionState(webView.page(), sessionState.get()); > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_JS_EQ(webView.page(), "history.scrollRestoration", "auto"); > } >Index: Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp (working copy) >@@ -59,11 +59,11 @@ static WKRetainPtr<WKDataRef> createSess > setPageLoaderClient(webView.page()); > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple-form", "html")).get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > EXPECT_JS_EQ(webView.page(), "submitForm()", "undefined"); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > auto sessionState = adoptWK(static_cast<WKSessionStateRef>(WKPageCopySessionState(webView.page(), reinterpret_cast<void*>(1), nullptr))); >@@ -86,7 +86,7 @@ TEST(WebKit, RestoreSessionStateContaini > auto sessionState = adoptWK(WKSessionStateCreateFromData(data.get())); > WKPageRestoreFromSessionState(webView.page(), sessionState.get()); > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_TRUE(WKPageCanGoBack(webView.page())); > } >Index: Tools/TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp (working copy) >@@ -93,7 +93,7 @@ TEST(WebKit, ScrollPinningBehaviors) > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple-tall", "html")).get()); > >- Util::run(&testDone); >+ runUntil(testDone); > EXPECT_TRUE(testDone); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp (working copy) >@@ -129,22 +129,22 @@ TEST(WebKit, ShouldKeepCurrentBackForwar > setPageLoaderClient(webView.page()); > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple", "html")).get()); >- Util::run(&finished); >+ runUntil(finished); > EXPECT_EQ(successfulSoFar, true); > > finished = false; > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple2", "html")).get()); >- Util::run(&finished); >+ runUntil(finished); > EXPECT_EQ(successfulSoFar, true); > > finished = false; > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple3", "html")).get()); >- Util::run(&finished); >+ runUntil(finished); > EXPECT_EQ(successfulSoFar, true); > > finished = false; > WKPageGoBack(webView.page()); >- Util::run(&finished); >+ runUntil(finished); > > EXPECT_EQ(successfulSoFar, true); > EXPECT_EQ(navigationNumber, 4); >Index: Tools/TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp (working copy) >@@ -79,7 +79,7 @@ TEST(WebKit, SpacebarScrolling) > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("spacebar-scrolling", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_JS_FALSE(webView.page(), "isDocumentScrolled()"); > EXPECT_JS_FALSE(webView.page(), "textFieldContainsSpace()"); >Index: Tools/TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp (working copy) >@@ -75,7 +75,7 @@ TEST(WebKit, StopLoadingDuringDidFailPro > WKRetainPtr<WKURLRef> url = adoptWK(Util::URLForNonExistentResource()); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp (working copy) >@@ -55,7 +55,7 @@ TEST(WebKit, TerminateTwice) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&loaded); >+ runUntil(loaded); > WKPageTerminate(webView.page()); > > // Reloading will start relaunching the process. >Index: Tools/TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp (working copy) >@@ -87,7 +87,7 @@ struct WebKit2TextFieldBeginAndEditEditi > { > didReceiveMessage = false; > WKPageRunJavaScriptInMainFrame(webView->page(), Util::toWK(javaScriptCode).get(), 0, nullJavaScriptCallback); >- Util::run(&didReceiveMessage); >+ runUntil(didReceiveMessage); > EXPECT_WK_STREQ(expectedMessageName, messageName); > } > >@@ -104,7 +104,7 @@ struct WebKit2TextFieldBeginAndEditEditi > didReceiveMessage = false; > > WKPageLoadURL(webView->page(), adoptWK(Util::createURLForResource("input-focus-blur", "html")).get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > } > }; > >Index: Tools/TestWebKitAPI/Tests/WebKit/UserMedia.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/UserMedia.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/UserMedia.cpp (working copy) >@@ -93,7 +93,7 @@ TEST(WebKit, UserMediaBasic) > > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&wasPrompted); >+ runUntil(wasPrompted); > } > > static void didCrashCallback(WKPageRef, const void*) >@@ -141,7 +141,7 @@ TEST(WebKit, OnDeviceChangeCrash) > wasPrompted = false; > url = adoptWK(Util::createURLForResource("getUserMedia", "html")); > WKPageLoadURL(webView2.page(), url.get()); >- Util::run(&wasPrompted); >+ runUntil(wasPrompted); > EXPECT_EQ(WKPageGetProcessIdentifier(webView.page()), WKPageGetProcessIdentifier(webView2.page())); > > didCrash = false; >@@ -152,7 +152,7 @@ TEST(WebKit, OnDeviceChangeCrash) > wasPrompted = false; > url = adoptWK(Util::createURLForResource("getUserMedia", "html")); > WKPageLoadURL(webView2.page(), url.get()); >- Util::run(&wasPrompted); >+ runUntil(wasPrompted); > // Verify pages process did not crash. > EXPECT_TRUE(!didCrash); > } >@@ -192,7 +192,7 @@ TEST(WebKit, EnumerateDevicesCrash) > didReceiveMessage = false; > auto url = adoptWK(Util::createURLForResource("getUserMedia", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didReceiveMessage); >+ runUntil(didReceiveMessage); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/UserMessage.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/UserMessage.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/UserMessage.cpp (working copy) >@@ -101,7 +101,7 @@ public: > > // Force the creation of the > WKPageLoadURL(webView->page(), adoptWK(Util::createURLForResource("simple", "html")).get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > } > >@@ -114,7 +114,7 @@ public: > recievedBody.clear(); > didReceiveMessage = false; > WKContextPostMessageToInjectedBundle(context.get(), Util::toWK("RoundTrip").get(), object); >- Util::run(&didReceiveMessage); >+ runUntil(didReceiveMessage); > > EXPECT_NOT_NULL(recievedBody); > EXPECT_EQ(storedTypeID, WKGetTypeID(recievedBody.get())); >Index: Tools/TestWebKitAPI/Tests/WebKit/ViewportSizeForViewportUnits.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/ViewportSizeForViewportUnits.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/ViewportSizeForViewportUnits.mm (working copy) >@@ -47,7 +47,7 @@ TEST(WebKit, ViewportSizeForViewportUnit > viewportSizeTestDone = true; > }]; > viewportSizeTestDone = false; >- TestWebKitAPI::Util::run(&viewportSizeTestDone); >+ TestWebKitAPI::runUntil(viewportSizeTestDone); > > // viewport width is 50px. > [webView _setViewportSizeForCSSViewportUnits:NSMakeSize(50, 50)]; >@@ -59,7 +59,7 @@ TEST(WebKit, ViewportSizeForViewportUnit > viewportSizeTestDone = true; > }]; > viewportSizeTestDone = false; >- TestWebKitAPI::Util::run(&viewportSizeTestDone); >+ TestWebKitAPI::runUntil(viewportSizeTestDone); > > // viewport height 10px. > [webView _setViewportSizeForCSSViewportUnits:NSMakeSize(10, 10)]; >@@ -71,7 +71,7 @@ TEST(WebKit, ViewportSizeForViewportUnit > viewportSizeTestDone = true; > }]; > viewportSizeTestDone = false; >- TestWebKitAPI::Util::run(&viewportSizeTestDone); >+ TestWebKitAPI::runUntil(viewportSizeTestDone); > > bool exceptionRaised = false; > @try { >Index: Tools/TestWebKitAPI/Tests/WebKit/WKBackForwardList.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/WKBackForwardList.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/WKBackForwardList.mm (working copy) >@@ -163,6 +163,6 @@ TEST(WKBackForwardList, WindowLocationAs > auto delegate = adoptNS([[AsyncPolicyDecisionDelegate alloc] init]); > [webView setNavigationDelegate:delegate.get()]; > [webView loadHTMLString:@"<script>window.location='simple.html'</script>" baseURL:simple2]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > EXPECT_STREQ(webView.get().backForwardList.currentItem.URL.absoluteString.UTF8String, simple.absoluteString.UTF8String); > } >Index: Tools/TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp (working copy) >@@ -80,7 +80,7 @@ TEST(WebKit, WKPageConfigurationBasic) > WKPageLoadURL(webView.page(), url.get()); > > didFinishLoad = false; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > } > > TEST(WebKit, WKPageConfigurationBasicWithDataStore) >@@ -102,7 +102,7 @@ TEST(WebKit, WKPageConfigurationBasicWit > WKPageLoadURL(webView.page(), url.get()); > > didFinishLoad = false; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > } > > TEST(WebKit, WKPageConfigurationBasicWithNonPersistentDataStore) >@@ -124,7 +124,7 @@ TEST(WebKit, WKPageConfigurationBasicWit > WKPageLoadURL(webView.page(), url.get()); > > didFinishLoad = false; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp (working copy) >@@ -78,23 +78,23 @@ static void createSessionStates(WKContex > setPageLoaderClient(webView.page()); > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple", "html")).get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple2", "html")).get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple3", "html")).get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > WKPageGoBack(webView.page()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > WKPageGoBack(webView.page()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > // Should be back on simple.html at this point. >@@ -113,7 +113,7 @@ TEST(WebKit, WKPageCopySessionStateWithF > PlatformWebView webView1(context.get()); > setPageLoaderClient(webView1.page()); > WKPageRestoreFromSessionState(webView1.page(), sessionStateWithFirstItemRemoved.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > WKBackForwardListRef backForwardList1 = WKPageGetBackForwardList(webView1.page()); >Index: Tools/TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp (working copy) >@@ -57,7 +57,7 @@ static WKRetainPtr<WKSessionStateRef> cr > setPageLoaderClient(webView.page()); > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple", "html")).get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > return adoptWK(static_cast<WKSessionStateRef>(WKPageCopySessionState(webView.page(), reinterpret_cast<void*>(1), nullptr))); >@@ -74,7 +74,7 @@ TEST(WebKit, WKPageGetScaleFactorNotZero > EXPECT_NOT_NULL(sessionState); > > WKPageRestoreFromSessionState(webView.page(), sessionState.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_TRUE(WKPageGetScaleFactor(webView.page()) == 1.0); > } >Index: Tools/TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp (working copy) >@@ -104,12 +104,12 @@ TEST(WebKit, WKPageIsPlayingAudio) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("file-with-video", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_FALSE(WKPageIsPlayingAudio(webView.page())); > WKPageRunJavaScriptInMainFrame(webView.page(), Util::toWK("playVideo()").get(), 0, nullJavaScriptCallback); > >- Util::run(&isPlayingAudioChanged); >+ runUntil(isPlayingAudioChanged); > EXPECT_TRUE(WKPageIsPlayingAudio(webView.page())); > } > >@@ -129,12 +129,12 @@ TEST(WebKit, MSEIsPlayingAudio) > didFinishLoad = false; > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > // Bail out of the test early if the platform does not support MSE. > isMSEEnabledChanged = false; > WKPageRunJavaScriptInMainFrame(webView.page(), Util::toWK("window.MediaSource !== undefined").get(), 0, isMSEEnabledCallback); >- Util::run(&isMSEEnabledChanged); >+ runUntil(isMSEEnabledChanged); > if (!isMSEEnabled) > return; > >@@ -142,7 +142,7 @@ TEST(WebKit, MSEIsPlayingAudio) > isPlayingAudioChanged = false; > WKPageRunJavaScriptInMainFrame(webView.page(), Util::toWK("playVideo()").get(), 0, nullJavaScriptCallback); > >- Util::run(&isPlayingAudioChanged); >+ runUntil(isPlayingAudioChanged); > EXPECT_TRUE(WKPageIsPlayingAudio(webView.page())); > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm (working copy) >@@ -104,7 +104,7 @@ TEST(WebKit, WKThumbnailViewKeepSnapshot > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("lots-of-text", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > RetainPtr<_WKThumbnailView> thumbnailView = adoptNS([[_WKThumbnailView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) fromWKView:wkView]); >@@ -114,7 +114,7 @@ TEST(WebKit, WKThumbnailViewKeepSnapshot > [thumbnailView addObserver:observer.get() forKeyPath:@"snapshotSize" options:NSKeyValueObservingOptionNew context:snapshotSizeChangeKVOContext]; > > [wkView.window.contentView addSubview:thumbnailView.get()]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > EXPECT_EQ([thumbnailView snapshotSize].width, 800); >@@ -125,7 +125,7 @@ TEST(WebKit, WKThumbnailViewKeepSnapshot > EXPECT_TRUE([thumbnailView layer].contents == nil); > > [wkView.window.contentView addSubview:thumbnailView.get()]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > [thumbnailView setShouldKeepSnapshotWhenRemovedFromSuperview:YES]; >@@ -150,7 +150,7 @@ TEST(WebKit, WKThumbnailViewMaximumSnaps > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("lots-of-text", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > RetainPtr<_WKThumbnailView> thumbnailView = adoptNS([[_WKThumbnailView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) fromWKView:wkView]); >@@ -160,14 +160,14 @@ TEST(WebKit, WKThumbnailViewMaximumSnaps > [thumbnailView addObserver:observer.get() forKeyPath:@"snapshotSize" options:NSKeyValueObservingOptionNew context:snapshotSizeChangeKVOContext]; > > [wkView.window.contentView addSubview:thumbnailView.get()]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > EXPECT_EQ([thumbnailView snapshotSize].width, 800); > EXPECT_FALSE([thumbnailView layer].contents == nil); > > [thumbnailView setMaximumSnapshotSize:CGSizeMake(200, 0)]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > EXPECT_EQ([thumbnailView snapshotSize].width, 200); >@@ -175,7 +175,7 @@ TEST(WebKit, WKThumbnailViewMaximumSnaps > EXPECT_FALSE([thumbnailView layer].contents == nil); > > [thumbnailView setMaximumSnapshotSize:CGSizeMake(0, 300)]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > EXPECT_EQ([thumbnailView snapshotSize].width, 400); >@@ -183,7 +183,7 @@ TEST(WebKit, WKThumbnailViewMaximumSnaps > EXPECT_FALSE([thumbnailView layer].contents == nil); > > [thumbnailView setMaximumSnapshotSize:CGSizeMake(200, 300)]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > EXPECT_EQ([thumbnailView snapshotSize].width, 200); >@@ -202,7 +202,7 @@ TEST(WebKit, WKThumbnailViewKeepSnapshot > auto delegate = adoptNS([[WKThumbnailViewDelegate alloc] init]); > [webView setNavigationDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"lots-of-text" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > RetainPtr<_WKThumbnailView> thumbnailView = adoptNS([[_WKThumbnailView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) fromWKWebView:webView.get()]); > >@@ -211,7 +211,7 @@ TEST(WebKit, WKThumbnailViewKeepSnapshot > [thumbnailView addObserver:observer.get() forKeyPath:@"snapshotSize" options:NSKeyValueObservingOptionNew context:snapshotSizeChangeKVOContext]; > > [webView addSubview:thumbnailView.get()]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > EXPECT_EQ([thumbnailView snapshotSize].width, 800); >@@ -222,7 +222,7 @@ TEST(WebKit, WKThumbnailViewKeepSnapshot > EXPECT_TRUE([thumbnailView layer].contents == nil); > > [webView addSubview:thumbnailView.get()]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > [thumbnailView setShouldKeepSnapshotWhenRemovedFromSuperview:YES]; >@@ -244,7 +244,7 @@ TEST(WebKit, WKThumbnailViewMaximumSnaps > auto delegate = adoptNS([[WKThumbnailViewDelegate alloc] init]); > [webView setNavigationDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"lots-of-text" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > auto thumbnailView = adoptNS([[_WKThumbnailView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) fromWKWebView:webView.get()]); > >@@ -253,13 +253,13 @@ TEST(WebKit, WKThumbnailViewMaximumSnaps > [thumbnailView addObserver:observer.get() forKeyPath:@"snapshotSize" options:NSKeyValueObservingOptionNew context:snapshotSizeChangeKVOContext]; > > [webView addSubview:thumbnailView.get()]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > EXPECT_EQ([thumbnailView snapshotSize].width, 800); > EXPECT_FALSE([thumbnailView layer].contents == nil); > > [thumbnailView setMaximumSnapshotSize:CGSizeMake(200, 0)]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > EXPECT_EQ([thumbnailView snapshotSize].width, 200); >@@ -267,7 +267,7 @@ TEST(WebKit, WKThumbnailViewMaximumSnaps > EXPECT_FALSE([thumbnailView layer].contents == nil); > > [thumbnailView setMaximumSnapshotSize:CGSizeMake(0, 300)]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > EXPECT_EQ([thumbnailView snapshotSize].width, 400); >@@ -275,7 +275,7 @@ TEST(WebKit, WKThumbnailViewMaximumSnaps > EXPECT_FALSE([thumbnailView layer].contents == nil); > > [thumbnailView setMaximumSnapshotSize:CGSizeMake(200, 300)]; >- Util::run(&didTakeSnapshot); >+ runUntil(didTakeSnapshot); > didTakeSnapshot = false; > > EXPECT_EQ([thumbnailView snapshotSize].width, 200); >Index: Tools/TestWebKitAPI/Tests/WebKit/WebArchive.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/WebArchive.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/WebArchive.cpp (working copy) >@@ -123,11 +123,11 @@ TEST(WebKit, WebArchive) > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple", "html")).get()); > > // Wait till the load finishes before getting the web archive. >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > WKContextPostMessageToInjectedBundle(context.get(), Util::toWK("GetWebArchive").get(), webView.page()); > > // Wait till we have received the web archive from the injected bundle. >- Util::run(&didReceiveMessage); >+ runUntil(didReceiveMessage); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/WebCoreStatisticsWithNoWebProcess.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/WebCoreStatisticsWithNoWebProcess.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/WebCoreStatisticsWithNoWebProcess.cpp (working copy) >@@ -47,7 +47,7 @@ TEST(WebKit, WebCoreStatisticsWithNoWebP > > WKContextGetStatistics(context.get(), 0, wkContextGetStatisticsCallback); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/WillLoad.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/WillLoad.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/WillLoad.cpp (working copy) >@@ -80,7 +80,7 @@ public: > void testWillLoadURLRequestReturnValues(WKURLRef expectedURL, WKStringRef expectedUserDataString) > { > didReceiveMessage = false; >- Util::run(&didReceiveMessage); >+ runUntil(didReceiveMessage); > > EXPECT_WK_STREQ("WillLoadURLRequestReturn", messageName.get()); > >@@ -101,7 +101,7 @@ public: > void testWillLoadDataRequestReturnValues(WKURLRef expectedURL, WKStringRef expectedMIMEType, WKStringRef expectedEncodingName, WKURLRef expectedUnreachableURL, WKStringRef expectedUserDataString) > { > didReceiveMessage = false; >- Util::run(&didReceiveMessage); >+ runUntil(didReceiveMessage); > > EXPECT_WK_STREQ("WillLoadDataRequestReturn", messageName.get()); > >Index: Tools/TestWebKitAPI/Tests/WebKit/WillSendSubmitEvent.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/WillSendSubmitEvent.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/WillSendSubmitEvent.cpp (working copy) >@@ -84,7 +84,7 @@ TEST(WebKit, WillSendSubmitEvent) > > PlatformWebView webView(context.get()); > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("auto-submitting-form", "html")).get()); >- Util::run(&didReceiveMessage); >+ runUntil(didReceiveMessage); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm (working copy) >@@ -72,13 +72,13 @@ TEST(WebKit, AttributedSubstringForPropo > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("chinese-character-with-image", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > [webView.platformView() attributedSubstringForProposedRange:NSMakeRange(0, 3) completionHandler: ^(NSAttributedString *attrString, NSRange actualRange) { > didFinishTest = true; > }]; > >- Util::run(&didFinishTest); >+ runUntil(didFinishTest); > EXPECT_EQ(didObserveWebProcessToCrash, false); > EXPECT_EQ(didReceiveInvalidMessage, false); > } >Index: Tools/TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm (working copy) >@@ -107,11 +107,11 @@ TEST(WebKit, ContextMenuDownloadHTMLDown > > expectedOriginatingPage = webView.page(); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > // Right click on link. > webView.simulateButtonClick(kWKEventMouseButtonRightButton, 50, 50, 0); >- Util::run(&didDecideDownloadDestination); >+ runUntil(didDecideDownloadDestination); > } > > static WKStringRef decideDestinationWithSuggestedFilenameContainingSlashes(WKContextRef, WKDownloadRef download, WKStringRef suggestedFilename, bool*, const void*) >@@ -154,11 +154,11 @@ TEST(WebKit, ContextMenuDownloadHTMLDown > > expectedOriginatingPage = webView.page(); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > // Right click on link. > webView.simulateButtonClick(kWKEventMouseButtonRightButton, 50, 50, 0); >- Util::run(&didDecideDownloadDestination); >+ runUntil(didDecideDownloadDestination); > } > > } >Index: Tools/TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.mm (working copy) >@@ -76,7 +76,7 @@ TEST(WebKit, ContextMenuImgWithVideo) > > contextMenuShown = false; > [subView mouseDown:event]; >- Util::run(&contextMenuShown); >+ runUntil(contextMenuShown); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm (working copy) >@@ -99,7 +99,7 @@ TEST(WebKit, CustomBundleParameter) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm (working copy) >@@ -62,7 +62,7 @@ TEST(WebKit, ScrollByLineCommands) > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple-tall", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_JS_EQ(webView.page(), "window.scrollY", "0"); > >Index: Tools/TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm (working copy) >@@ -80,10 +80,10 @@ TEST(WebKit, ForceLightAppearanceInBundl > WKContextSetInjectedBundleClient(context.get(), &injectedBundleClient.base); > > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("dark-mode", "html")).get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > WKContextPostMessageToInjectedBundle(context.get(), Util::toWK("RunTest").get(), nullptr); >- Util::run(&messageReceived); >+ runUntil(messageReceived); > messageReceived = false; > } > >Index: Tools/TestWebKitAPI/Tests/WebKit/mac/GetBackingScaleFactor.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/mac/GetBackingScaleFactor.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/mac/GetBackingScaleFactor.mm (working copy) >@@ -76,7 +76,7 @@ TEST(WebKit, GetBackingScaleFactor) > > [[window1.get() contentView] addSubview:view.get()]; > WKContextPostMessageToInjectedBundle(context.get(), Util::toWK("GetBackingScaleFactor").get(), 0); >- Util::run(&messageReceived); >+ runUntil(messageReceived); > messageReceived = false; > EXPECT_EQ(1, backingScaleFactor); > >@@ -85,13 +85,13 @@ TEST(WebKit, GetBackingScaleFactor) > > [[window2.get() contentView] addSubview:view.get()]; > WKContextPostMessageToInjectedBundle(context.get(), Util::toWK("GetBackingScaleFactor").get(), 0); >- Util::run(&messageReceived); >+ runUntil(messageReceived); > messageReceived = false; > EXPECT_EQ(2, backingScaleFactor); > > WKPageSetCustomBackingScaleFactor(view.get().pageRef, 3); > WKContextPostMessageToInjectedBundle(context.get(), Util::toWK("GetBackingScaleFactor").get(), 0); >- Util::run(&messageReceived); >+ runUntil(messageReceived); > messageReceived = false; > EXPECT_EQ(3, backingScaleFactor); > } >Index: Tools/TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp (working copy) >@@ -57,7 +57,7 @@ TEST(WebKit, GetPIDAfterAbortedProcessLa > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&loaded); >+ runUntil(loaded); > WKPageTerminate(webView.page()); > > // Reloading will start relaunching the process. >Index: Tools/TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp (working copy) >@@ -90,7 +90,7 @@ TEST(WebKit, InjectedBundleAppleEvent) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm (working copy) >@@ -93,13 +93,13 @@ TEST(WebKit, RestoreStateAfterTerminatio > > // Load a test page containing a form. > WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple-form", "html")).get()); >- Util::run(&loadBeforeCrash); >+ runUntil(loadBeforeCrash); > > // Make the page visible. > isWaitingForPageSignalToContinue = true; > didGetPageSignalToContinue = false; > [window.get() makeKeyAndOrderFront:nil]; >- Util::run(&didGetPageSignalToContinue); >+ runUntil(didGetPageSignalToContinue); > EXPECT_JS_EQ(webView.page(), "document.visibilityState", "visible"); > > EXPECT_JS_EQ(webView.page(), "getFormData()", "Some unimportant data"); >@@ -113,7 +113,7 @@ TEST(WebKit, RestoreStateAfterTerminatio > isWaitingForPageSignalToContinue = true; > didGetPageSignalToContinue = false; > [webView.platformView() removeFromSuperview]; >- Util::run(&didGetPageSignalToContinue); >+ runUntil(didGetPageSignalToContinue); > > EXPECT_JS_EQ(webView.page(), "document.visibilityState", "hidden"); > >@@ -122,7 +122,7 @@ TEST(WebKit, RestoreStateAfterTerminatio > > // Reload should re-spawn webprocess and restore document state. > WKPageReload(webView.page()); >- Util::run(&loadAfterCrash); >+ runUntil(loadAfterCrash); > > // Make sure that the form data is restored after the reload. > EXPECT_JS_EQ(webView.page(), "getFormData()", "Important data"); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm (working copy) >@@ -80,7 +80,7 @@ public: > > [webView stringByEvaluatingJavaScript:[NSString stringWithFormat:@"test('%s')", elementType == ElementType::Audio ? "audio" : "video"]]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > auto type = [webView stringByEvaluatingJavaScript:@"elementType()"]; > > if (elementType == ElementType::Audio) >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLs.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLs.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLs.mm (working copy) >@@ -94,7 +94,7 @@ TEST(WebKit, AdditionalReadAccessAllowed > EXPECT_WK_STREQ(@"hello", string); > EXPECT_EQ(nullptr, error); > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [proxy readStringFromURL:unreadableFileURL completionHandler:^(NSString *string, NSError *error) { >@@ -103,7 +103,7 @@ TEST(WebKit, AdditionalReadAccessAllowed > EXPECT_WK_STREQ(NSCocoaErrorDomain, error.domain); > EXPECT_EQ(NSFileReadNoPermissionError, error.code); > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/AdditionalSupportedImageTypes.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/AdditionalSupportedImageTypes.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/AdditionalSupportedImageTypes.mm (working copy) >@@ -53,7 +53,7 @@ static void runTest(NSArray<NSString *> > isDone = true; > }]; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WebKit, AddSupportedImageType) >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm (working copy) >@@ -97,7 +97,7 @@ TEST(WebKit, DISABLED_ResizeWithHiddenCo > [window addSubview:webView.get()]; > [window setHidden:NO]; > >- TestWebKitAPI::Util::run(&didLayout); >+ TestWebKitAPI::runUntil(didLayout); > didLayout = false; > > for (unsigned i = 0; i < 50; i++) { >@@ -105,7 +105,7 @@ TEST(WebKit, DISABLED_ResizeWithHiddenCo > [webView setFrame:CGRectMake(0, 0, [webView frame].size.width + 100, 400)]; > }]; > >- TestWebKitAPI::Util::run(&didEndAnimatedResize); >+ TestWebKitAPI::runUntil(didEndAnimatedResize); > didEndAnimatedResize = false; > } > } >@@ -121,7 +121,7 @@ TEST(WebKit, AnimatedResizeDoesNotHang) > [window addSubview:webView.get()]; > [window setHidden:NO]; > >- TestWebKitAPI::Util::run(&didLayout); >+ TestWebKitAPI::runUntil(didLayout); > didLayout = false; > > for (unsigned i = 0; i < 50; i++) { >@@ -133,7 +133,7 @@ TEST(WebKit, AnimatedResizeDoesNotHang) > [webView _endAnimatedResize]; > }); > >- TestWebKitAPI::Util::run(&didEndAnimatedResize); >+ TestWebKitAPI::runUntil(didEndAnimatedResize); > didEndAnimatedResize = false; > } > } >@@ -171,7 +171,7 @@ TEST(WebKit, AnimatedResizeBlocksViewpor > [webView _endAnimatedResize]; > }]; > >- TestWebKitAPI::Util::run(&didEndAnimatedResize); >+ TestWebKitAPI::runUntil(didEndAnimatedResize); > didEndAnimatedResize = false; > > // Wait for one more commit so that we see the viewport-fit state >@@ -180,7 +180,7 @@ TEST(WebKit, AnimatedResizeBlocksViewpor > [webView _doAfterNextPresentationUpdate:^{ > didGetCommitAfterEndAnimatedResize = true; > }]; >- TestWebKitAPI::Util::run(&didGetCommitAfterEndAnimatedResize); >+ TestWebKitAPI::runUntil(didGetCommitAfterEndAnimatedResize); > > EXPECT_TRUE(didChangeSafeAreaShouldAffectObscuredInsets); > } >@@ -222,7 +222,7 @@ TEST(WebKit, OverrideLayoutSizeChangesDu > }]; > }]; > >- TestWebKitAPI::Util::run(&didReadLayoutSize); >+ TestWebKitAPI::runUntil(didReadLayoutSize); > } > > TEST(WebKit, OverrideLayoutSizeIsRestoredAfterProcessRelaunch) >@@ -253,7 +253,7 @@ TEST(WebKit, OverrideLayoutSizeIsRestore > > didReadLayoutSize = true; > }]; >- TestWebKitAPI::Util::run(&didReadLayoutSize); >+ TestWebKitAPI::runUntil(didReadLayoutSize); > } > > TEST(WebKit, OverrideLayoutSizeIsRestoredAfterChangingDuringProcessRelaunch) >@@ -286,7 +286,7 @@ TEST(WebKit, OverrideLayoutSizeIsRestore > > didReadLayoutSize = true; > }]; >- TestWebKitAPI::Util::run(&didReadLayoutSize); >+ TestWebKitAPI::runUntil(didReadLayoutSize); > } > > static UIView *immediateSubviewOfClass(UIView *view, Class cls) >@@ -336,7 +336,7 @@ TEST(WebKit, ResizeWithContentHiddenComp > didReadLayoutSize = true; > }]; > }]; >- TestWebKitAPI::Util::run(&didReadLayoutSize); >+ TestWebKitAPI::runUntil(didReadLayoutSize); > > UIView *scrollView = immediateSubviewOfClass(webView.get(), NSClassFromString(@"WKScrollView")); > UIView *contentView = immediateSubviewOfClass(scrollView, NSClassFromString(@"WKContentView")); >@@ -381,7 +381,7 @@ TEST(WebKit, ResizeWithContentHiddenWith > didReadLayoutSize = true; > }]; > }]; >- TestWebKitAPI::Util::run(&didReadLayoutSize); >+ TestWebKitAPI::runUntil(didReadLayoutSize); > > UIView *scrollView = immediateSubviewOfClass(webView.get(), NSClassFromString(@"WKScrollView")); > UIView *contentView = immediateSubviewOfClass(scrollView, NSClassFromString(@"WKContentView")); >@@ -424,8 +424,8 @@ TEST(WebKit, AnimatedResizeBlocksDoAfter > [webView _endAnimatedResize]; > }]; > >- TestWebKitAPI::Util::run(&didEndAnimatedResize); >- TestWebKitAPI::Util::run(&didGetCommitAfterEndAnimatedResize); >+ TestWebKitAPI::runUntil(didEndAnimatedResize); >+ TestWebKitAPI::runUntil(didGetCommitAfterEndAnimatedResize); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm (working copy) >@@ -87,7 +87,7 @@ TEST(ApplePay, ApplePayAvailableByDefaul > auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectZero configuration:configuration]); > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://bundle-html-file/apple-pay-availability"]]]; > >- Util::run(&isDone); >+ runUntil(isDone); > > [TestProtocol unregister]; > } >@@ -106,7 +106,7 @@ TEST(ApplePay, UserScriptAtDocumentStart > auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectZero configuration:configuration]); > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://bundle-html-file/apple-pay-availability"]]]; > >- Util::run(&isDone); >+ runUntil(isDone); > > EXPECT_EQ(YES, [[webView objectByEvaluatingJavaScript:@"window.wkUserScriptInjected"] boolValue]); > >@@ -127,7 +127,7 @@ TEST(ApplePay, UserScriptAtDocumentEndDi > auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectZero configuration:configuration]); > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://bundle-html-file/apple-pay-availability"]]]; > >- Util::run(&isDone); >+ runUntil(isDone); > > EXPECT_EQ(YES, [[webView objectByEvaluatingJavaScript:@"window.wkUserScriptInjected"] boolValue]); > >@@ -148,7 +148,7 @@ TEST(ApplePay, UserAgentScriptEvaluation > [webView _test_waitForDidFinishNavigation]; > [webView evaluateJavaScript:@"window.wkScriptEvaluated = true; loadApplePayFrame();" completionHandler:nil]; > >- Util::run(&isDone); >+ runUntil(isDone); > > EXPECT_EQ(YES, [[webView objectByEvaluatingJavaScript:@"window.wkScriptEvaluated"] boolValue]); > >@@ -167,13 +167,13 @@ TEST(ApplePay, UserAgentScriptEvaluation > auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectZero configuration:configuration]); > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://bundle-html-file/apple-pay-availability"]]]; > >- Util::run(&isDone); >+ runUntil(isDone); > > isDone = false; > [messageHandler setCanMakePaymentsExpectation:NO]; > [webView evaluateJavaScript:@"document.location.hash = '#test'" completionHandler:nil]; > >- Util::run(&isDone); >+ runUntil(isDone); > > [TestProtocol unregister]; > } >@@ -196,7 +196,7 @@ TEST(ApplePay, ActiveSessionBlocksUserAg > EXPECT_NOT_NULL(error); > isDone = true; > }]; >- Util::run(&isDone); >+ runUntil(isDone); > > [TestProtocol unregister]; > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm (working copy) >@@ -64,7 +64,7 @@ TEST(WebKit, ApplicationManifestBasic) > EXPECT_NULL(manifest); > done = true; > }]; >- Util::run(&done); >+ runUntil(done); > > done = false; > [webView synchronouslyLoadHTMLString:@"<link rel=\"manifest\" href=\"invalidurl://path\">"]; >@@ -72,7 +72,7 @@ TEST(WebKit, ApplicationManifestBasic) > EXPECT_NULL(manifest); > done = true; > }]; >- Util::run(&done); >+ runUntil(done); > > done = false; > NSDictionary *manifestObject = @{ @"name": @"Test" }; >@@ -81,7 +81,7 @@ TEST(WebKit, ApplicationManifestBasic) > EXPECT_TRUE([manifest.name isEqualToString:@"Test"]); > done = true; > }]; >- Util::run(&done); >+ runUntil(done); > > done = false; > manifestObject = @{ >@@ -102,7 +102,7 @@ TEST(WebKit, ApplicationManifestBasic) > EXPECT_TRUE([manifest.scope isEqual:[NSURL URLWithString:@"http://example.com/app"]]); > done = true; > }]; >- Util::run(&done); >+ runUntil(done); > } > > TEST(WebKit, ApplicationManifestDisplayMode) >@@ -131,7 +131,7 @@ TEST(WebKit, ApplicationManifestDisplayM > done = true; > EXPECT_STREQ(expectedPageContent.UTF8String, contents.UTF8String); > }]; >- Util::run(&done); >+ runUntil(done); > [webView removeFromSuperview]; > } > }]; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm (working copy) >@@ -86,7 +86,7 @@ TEST(WebKit, RespondToPolicyForNavigatio > navigationFailed = false; > navigationComplete = false; > [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]]; >- TestWebKitAPI::Util::run(&navigationComplete); >+ TestWebKitAPI::runUntil(navigationComplete); > > EXPECT_FALSE(navigationFailed); > } >@@ -104,7 +104,7 @@ TEST(WebKit, PolicyForNavigationResponse > navigationFailed = false; > navigationComplete = false; > [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]]; >- TestWebKitAPI::Util::run(&navigationComplete); >+ TestWebKitAPI::runUntil(navigationComplete); > > EXPECT_TRUE(navigationFailed); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm (working copy) >@@ -50,33 +50,33 @@ TEST(WebKit, AttrStyle) > EXPECT_TRUE(result.boolValue); > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > isDone = false; > [webView evaluateJavaScript:@"document.body.getAttributeNode('background').style.cssText" completionHandler:^(NSString *result, NSError *error) { > EXPECT_STREQ("background-image: url(\"about://example.com/body.png\");", result.UTF8String); > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > isDone = false; > [webView evaluateJavaScript:@"document.body.getAttributeNode('dir').style.cssText" completionHandler:^(NSString *result, NSError *error) { > EXPECT_STREQ("direction: rtl; unicode-bidi: embed;", result.UTF8String); > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > isDone = false; > [webView evaluateJavaScript:@"document.body.getAttributeNode('marginheight').style.cssText" completionHandler:^(NSString *result, NSError *error) { > EXPECT_STREQ("margin-bottom: 20px; margin-top: 20px;", result.UTF8String); > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > isDone = false; > [webView evaluateJavaScript:@"document.getElementById('target').getAttributeNode('align').style.cssText" completionHandler:^(NSString *result, NSError *error) { > EXPECT_STREQ("text-align: -webkit-center;", result.UTF8String); > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm (working copy) >@@ -92,7 +92,7 @@ - (void)beginLayoutAtMinimumWidth:(CGFlo > > - (void)waitForContentSizeChangeResettingWidth:(BOOL)resetAfter > { >- TestWebKitAPI::Util::run(&didInvalidateIntrinsicContentSize); >+ TestWebKitAPI::runUntil(didInvalidateIntrinsicContentSize); > > NSSize intrinsicContentSize = self.intrinsicContentSize; > EXPECT_EQ(_expectedIntrinsicContentSize.width, intrinsicContentSize.width); >@@ -156,7 +156,7 @@ TEST(WebKit, AutoLayoutIntegration) > EXPECT_EQ(10, [value integerValue]); > didEvaluateJavaScript = true; > }]; >- TestWebKitAPI::Util::run(&didEvaluateJavaScript); >+ TestWebKitAPI::runUntil(didEvaluateJavaScript); > didEvaluateJavaScript = false; > > // Enabling _shouldExpandContentToViewHeightForAutoLayout should make the page lay out to the view height, regardless >@@ -169,7 +169,7 @@ TEST(WebKit, AutoLayoutIntegration) > EXPECT_EQ(1000, [value integerValue]); > didEvaluateJavaScript = true; > }]; >- TestWebKitAPI::Util::run(&didEvaluateJavaScript); >+ TestWebKitAPI::runUntil(didEvaluateJavaScript); > didEvaluateJavaScript = false; > [webView _setShouldExpandContentToViewHeightForAutoLayout:NO]; > } >@@ -198,9 +198,9 @@ TEST(WebKit, AutoLayoutRenderingProgress > [webView setExpectingIntrinsicContentSizeChange:YES]; > [webView setExpectedIntrinsicContentSize:NSMakeSize(100, 400)]; > [webView loadHTMLString:@"<body style='margin: 0; height: 400px;'></body>" baseURL:nil]; >- TestWebKitAPI::Util::run(&didInvalidateIntrinsicContentSize); >- TestWebKitAPI::Util::run(&didFirstLayout); >- TestWebKitAPI::Util::run(&didFinishNavigation); >+ TestWebKitAPI::runUntil(didInvalidateIntrinsicContentSize); >+ TestWebKitAPI::runUntil(didFirstLayout); >+ TestWebKitAPI::runUntil(didFinishNavigation); > [webView setNavigationDelegate:nil]; > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/BundleEditingDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/BundleEditingDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/BundleEditingDelegate.mm (working copy) >@@ -85,7 +85,7 @@ [[webView _remoteObjectRegistry] reg > > [webView performSelector:@selector(copy:) withObject:nil]; > >- TestWebKitAPI::Util::run(&didWriteToPasteboard); >+ TestWebKitAPI::runUntil(didWriteToPasteboard); > > NSString *copiedString = nil; > #if PLATFORM(MAC) >@@ -102,7 +102,7 @@ [[webView _remoteObjectRegistry] reg > #endif > [webView performSelector:@selector(paste:) withObject:nil]; > >- TestWebKitAPI::Util::run(&shouldInsertTextCalled); >+ TestWebKitAPI::runUntil(shouldInsertTextCalled); > > __block bool doneEvaluatingJavaScript = false; > [webView evaluateJavaScript:@"document.body.firstChild.textContent" completionHandler:^(id _Nullable value, NSError * _Nullable error) { >@@ -112,7 +112,7 @@ [[webView _remoteObjectRegistry] reg > doneEvaluatingJavaScript = true; > }]; > >- TestWebKitAPI::Util::run(&doneEvaluatingJavaScript); >+ TestWebKitAPI::runUntil(doneEvaluatingJavaScript); > } > > TEST(WebKit, WKWebProcessPlugInDoNotCrashWhenCopyingEmptyClientData) >@@ -129,7 +129,7 @@ _WKRemoteObjectInterface *interface > [[webView _remoteObjectRegistry] registerExportedObject:object.get() interface:interface]; > > [webView performSelector:@selector(copy:) withObject:nil]; >- TestWebKitAPI::Util::run(&didWriteToPasteboard); >+ TestWebKitAPI::runUntil(didWriteToPasteboard); > } > > #endif // PLATFORM(MAC) >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/BundleParameters.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/BundleParameters.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/BundleParameters.mm (working copy) >@@ -46,7 +46,7 @@ TEST(WebKit, BundleParameters) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > NSString * const testParameter1 = @"TestParameter1"; >@@ -55,7 +55,7 @@ TEST(WebKit, BundleParameters) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > NSString * const testString = @"PASS"; >@@ -66,7 +66,7 @@ TEST(WebKit, BundleParameters) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > NSDictionary * const testDictionary = @{ @"result" : @"PASS" }; >@@ -77,7 +77,7 @@ TEST(WebKit, BundleParameters) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > [[configuration processPool] _setObject:nil forBundleParameter:testParameter1]; >@@ -86,7 +86,7 @@ TEST(WebKit, BundleParameters) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > NSString * const testParameter2 = @"TestParameter2"; >@@ -99,7 +99,7 @@ TEST(WebKit, BundleParameters) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > [webView evaluateJavaScript:testParameter2 completionHandler:^(id result, NSError *error) { >@@ -108,6 +108,6 @@ TEST(WebKit, BundleParameters) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/BundleRangeHandle.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/BundleRangeHandle.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/BundleRangeHandle.mm (working copy) >@@ -71,8 +71,8 @@ [[webView _remoteObjectRegistry] reg > > [webView loadHTMLString:@"Visit webkit.org <em> or</em> email webkit-dev@lists.webkit.org." baseURL:nil]; > >- TestWebKitAPI::Util::run(&didGetTextFromBodyRange); >+ TestWebKitAPI::runUntil(didGetTextFromBodyRange); > #if PLATFORM(IOS_FAMILY) >- TestWebKitAPI::Util::run(&didGetBodyInnerHTMLAfterDetectingData); >+ TestWebKitAPI::runUntil(didGetBodyInnerHTMLAfterDetectingData); > #endif > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm (working copy) >@@ -247,7 +247,7 @@ TEST(Challenge, SecIdentity) > [webView setNavigationDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://127.0.0.1:%d/", server.port()]]]]; > >- Util::run(&navigationFinished); >+ runUntil(navigationFinished); > > EXPECT_NOT_NULL(keychainPath.get()); > NSError *error = nil; >@@ -297,10 +297,10 @@ TEST(Challenge, BasicProposedCredential) > [webView setNavigationDelegate:delegate.get()]; > RetainPtr<NSURLRequest> request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://127.0.0.1:%d/", server.port()]]]; > [webView loadRequest:request.get()]; >- Util::run(&navigationFinished); >+ runUntil(navigationFinished); > navigationFinished = false; > [webView loadRequest:request.get()]; >- Util::run(&navigationFinished); >+ runUntil(navigationFinished); > EXPECT_TRUE(receivedSecondChallenge); > > __block bool removedCredential = false; >@@ -310,7 +310,7 @@ TEST(Challenge, BasicProposedCredential) > removedCredential = true; > }]; > }]; >- Util::run(&removedCredential); >+ runUntil(removedCredential); > } > > static void verifyCertificateAndPublicKey(SecTrustRef trust) >@@ -423,7 +423,7 @@ TEST(WebKit, ServerTrust) > [webView setNavigationDelegate:delegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://localhost:%d/", server.port()]]]]; >- TestWebKitAPI::Util::run(&navigationFinished); >+ TestWebKitAPI::runUntil(navigationFinished); > > verifyCertificateAndPublicKey([webView serverTrust]); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewAfterEnterFullscreen.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewAfterEnterFullscreen.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewAfterEnterFullscreen.mm (working copy) >@@ -69,7 +69,7 @@ TEST(CloseWebViewAfterEnterFullscreen, V > > didEnterFullscreen = false; > [webView evaluateJavaScript:@"document.querySelector('video').webkitEnterFullscreen()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&didEnterFullscreen); >+ TestWebKitAPI::runUntil(didEnterFullscreen); > ASSERT_TRUE(didEnterFullscreen); > > // Should not crash: >@@ -89,7 +89,7 @@ TEST(CloseWebViewAfterEnterFullscreen, E > > didEnterFullscreen = false; > [webView evaluateJavaScript:@"document.querySelector('div').webkitRequestFullscreen()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&didEnterFullscreen); >+ TestWebKitAPI::runUntil(didEnterFullscreen); > ASSERT_TRUE(didEnterFullscreen); > > // Should not crash: >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewDuringEnterFullscreen.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewDuringEnterFullscreen.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewDuringEnterFullscreen.mm (working copy) >@@ -69,7 +69,7 @@ TEST(CloseWebViewDuringEnterFullscreen, > > willEnterFullscreen = false; > [webView evaluateJavaScript:@"document.querySelector('video').webkitEnterFullscreen()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&willEnterFullscreen); >+ TestWebKitAPI::runUntil(willEnterFullscreen); > TestWebKitAPI::Util::sleep(0.2); > > // Should not crash: >@@ -89,7 +89,7 @@ TEST(CloseWebViewDuringEnterFullscreen, > > willEnterFullscreen = false; > [webView evaluateJavaScript:@"document.querySelector('div').webkitRequestFullscreen()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&willEnterFullscreen); >+ TestWebKitAPI::runUntil(willEnterFullscreen); > TestWebKitAPI::Util::sleep(0.2); > > // Should not crash: >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm (working copy) >@@ -123,11 +123,11 @@ public: > void loadFiles() > { > WKPageLoadFile([webView pageRef], file1.get(), nullptr); >- TestWebKitAPI::Util::run(&didFinishNavigation); >+ TestWebKitAPI::runUntil(didFinishNavigation); > didFinishNavigation = false; > > WKPageLoadFile([webView pageRef], file2.get(), nullptr); >- TestWebKitAPI::Util::run(&didFinishNavigation); >+ TestWebKitAPI::runUntil(didFinishNavigation); > didFinishNavigation = false; > } > }; >@@ -210,7 +210,7 @@ TEST_F(WebKit2_CommandBackForwardTestWKV > > // Attempt to go back (using command-left). > simulateCommandArrow(webView.get(), Left); >- TestWebKitAPI::Util::run(&didFinishNavigation); >+ TestWebKitAPI::runUntil(didFinishNavigation); > didFinishNavigation = false; > > auto currentURL2 = adoptWK(WKPageCopyActiveURL([webView pageRef])); >@@ -218,7 +218,7 @@ TEST_F(WebKit2_CommandBackForwardTestWKV > > // Attempt to go back (using command-right). > simulateCommandArrow(webView.get(), Right); >- TestWebKitAPI::Util::run(&didFinishNavigation); >+ TestWebKitAPI::runUntil(didFinishNavigation); > didFinishNavigation = false; > > auto currentURL3 = adoptWK(WKPageCopyActiveURL([webView pageRef])); >@@ -237,7 +237,7 @@ TEST_F(WebKit2_CommandBackForwardTestWKV > > // Attempt to go back (using command-right) > simulateCommandArrow(webView.get(), Right); >- TestWebKitAPI::Util::run(&didFinishNavigation); >+ TestWebKitAPI::runUntil(didFinishNavigation); > didFinishNavigation = false; > > auto currentURL2 = adoptWK(WKPageCopyActiveURL([webView pageRef])); >@@ -245,7 +245,7 @@ TEST_F(WebKit2_CommandBackForwardTestWKV > > // Attempt to go back (using command-left). > simulateCommandArrow(webView.get(), Left); >- TestWebKitAPI::Util::run(&didFinishNavigation); >+ TestWebKitAPI::runUntil(didFinishNavigation); > didFinishNavigation = false; > > auto currentURL3 = adoptWK(WKPageCopyActiveURL([webView pageRef])); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm (working copy) >@@ -127,7 +127,7 @@ TEST(ContentFiltering, URLAfterServerRed > auto navigationDelegate = adoptNS([[ServerRedirectNavigationDelegate alloc] init]); > [webView setNavigationDelegate:navigationDelegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://redirect?pass"]]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > [TestProtocol unregister]; > } >@@ -186,9 +186,9 @@ static void downloadTest(Decision decisi > downloadDidStart = false; > const bool downloadShouldStart = decision == Decision::Allow || decisionPoint > DecisionPoint::AfterResponse; > if (downloadShouldStart) >- TestWebKitAPI::Util::run(&downloadDidStart); >+ TestWebKitAPI::runUntil(downloadDidStart); > else >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(downloadShouldStart, downloadDidStart); > >@@ -291,7 +291,7 @@ static void loadAlternateTest(Decision d > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://redirect/?result"]]]; > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > [TestProtocol unregister]; > } >@@ -370,7 +370,7 @@ - (void)expectParentalControlsLoaded:(BO > #endif // HAVE(NETWORK_EXTENSION) > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation >@@ -388,31 +388,31 @@ TEST(ContentFiltering, LazilyLoadPlatfor > > isDone = false; > [[controller webView] loadHTMLString:@"PASS" baseURL:[NSURL URLWithString:@"about:blank"]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > [controller expectParentalControlsLoaded:NO networkExtensionLoaded:NO]; > > isDone = false; > [[controller webView] loadData:[NSData dataWithBytes:"PASS" length:4] MIMEType:@"text/html" characterEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:@"about:blank"]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > [controller expectParentalControlsLoaded:NO networkExtensionLoaded:NO]; > > isDone = false; > NSURL *fileURL = [[NSBundle mainBundle] URLForResource:@"ContentFiltering" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; > [[controller webView] loadFileURL:fileURL allowingReadAccessToURL:fileURL]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > [controller expectParentalControlsLoaded:NO networkExtensionLoaded:NO]; > > isDone = false; > [TestProtocol registerWithScheme:@"custom"]; > [[controller webView] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"custom://test"]]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > [controller expectParentalControlsLoaded:NO networkExtensionLoaded:NO]; > [TestProtocol unregister]; > > isDone = false; > [TestProtocol registerWithScheme:@"http"]; > [[controller webView] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://test"]]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > #if PLATFORM(MAC) > [controller expectParentalControlsLoaded:NO networkExtensionLoaded:YES]; > #else >@@ -424,7 +424,7 @@ TEST(ContentFiltering, LazilyLoadPlatfor > isDone = false; > [TestProtocol registerWithScheme:@"https"]; > [[controller webView] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://test"]]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > [controller expectParentalControlsLoaded:YES networkExtensionLoaded:YES]; > [TestProtocol unregister]; > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm (working copy) >@@ -120,7 +120,7 @@ static RetainPtr<WKContentRuleList> make > contentRuleList = list; > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > return contentRuleList; > } > >@@ -133,7 +133,7 @@ TEST(WebKit, ContentRuleListNotification > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > [webView setNavigationDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"apitest:///match"]]]; >- TestWebKitAPI::Util::run(&receivedNotification); >+ TestWebKitAPI::runUntil(receivedNotification); > EXPECT_STREQ([notificationURL absoluteString].UTF8String, "apitest:///match"); > EXPECT_STREQ([notificationIdentifier UTF8String], "testidentifier"); > } >@@ -148,7 +148,7 @@ TEST(WebKit, ContentRuleListNotification > [webView setNavigationDelegate:delegate.get()]; > [webView setUIDelegate:delegate.get()]; > [webView loadHTMLString:@"<script>fetch('match').then(function(response){alert('fetch complete')})</script>" baseURL:[NSURL URLWithString:@"apitest:///"]]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > EXPECT_TRUE(receivedNotification); > EXPECT_STREQ([notificationURL absoluteString].UTF8String, "apitest:///match"); > EXPECT_STREQ([notificationIdentifier UTF8String], "testidentifier"); >@@ -167,7 +167,7 @@ TEST(WebKit, PerformedActionForURL) > [webView setNavigationDelegate:delegate.get()]; > [webView setUIDelegate:delegate.get()]; > [webView loadHTMLString:@"<script>fetch('notify').then(function(){fetch('block').then().catch(function(){alert('test complete')})})</script>" baseURL:[NSURL URLWithString:@"apitest:///"]]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > while (notificationList.size() < 2) > TestWebKitAPI::Util::spinRunLoop(); > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/CookieAcceptPolicy.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/CookieAcceptPolicy.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/CookieAcceptPolicy.mm (working copy) >@@ -66,7 +66,7 @@ TEST(WebKit, CookieAcceptPolicy) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"CookieMessage" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [processPool _setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyNever]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > EXPECT_STREQ([(NSString *)[lastScriptMessage body] UTF8String], "COOKIE:"); > > [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:originalCookieAcceptPolicy]; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm (working copy) >@@ -63,8 +63,8 @@ TEST(WebKit, CookiePrivateBrowsing) > [view2 setUIDelegate:delegate.get()]; > NSString *alertOldCookie = @"<script>var oldCookie = document.cookie; document.cookie = 'key=value'; alert('old cookie: <' + oldCookie + '>');</script>"; > [view1 loadHTMLString:alertOldCookie baseURL:[NSURL URLWithString:@"http://example.com/"]]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > receivedAlert = false; > [view2 loadHTMLString:alertOldCookie baseURL:[NSURL URLWithString:@"http://example.com/"]]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm (working copy) >@@ -48,7 +48,7 @@ TEST(CustomUserAgent, UpdateCachedNaviga > webView.get().customUserAgent = @"Custom UserAgent"; > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Query navigator.userAgent again to make sure its cache was invalidated and it returns the updated value. >@@ -59,6 +59,6 @@ TEST(CustomUserAgent, UpdateCachedNaviga > EXPECT_WK_STREQ(@"Custom UserAgent", userAgent); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm (working copy) >@@ -48,7 +48,7 @@ - (void)synchronouslyDetectDataWithTypes > [self _detectDataWithTypes:types completionHandler:^{ > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > - (void)synchronouslyRemoveDataDetectedLinks >@@ -57,7 +57,7 @@ - (void)synchronouslyRemoveDataDetectedL > [self _removeDataDetectedLinks:^{ > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > @end >@@ -94,7 +94,7 @@ void expectLinkCount(WKWebView *webView, > ranScript = true; > }]; > >- TestWebKitAPI::Util::run(&ranScript); >+ TestWebKitAPI::runUntil(ranScript); > ranScript = false; > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm (working copy) >@@ -97,11 +97,11 @@ TEST(WebKit, DecidePolicyForNavigationAc > > finishedNavigation = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:firstURL]]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > decidedPolicy = false; > [webView reload]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeReload, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -127,11 +127,11 @@ TEST(WebKit, DecidePolicyForNavigationAc > > finishedNavigation = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:firstURL]]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > decidedPolicy = false; > [webView reloadFromOrigin]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeReload, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -157,15 +157,15 @@ TEST(WebKit, DecidePolicyForNavigationAc > > finishedNavigation = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:firstURL]]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > finishedNavigation = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:secondURL]]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > decidedPolicy = false; > [webView goBack]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeBackForward, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -191,19 +191,19 @@ TEST(WebKit, DecidePolicyForNavigationAc > > finishedNavigation = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:firstURL]]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > finishedNavigation = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:secondURL]]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > finishedNavigation = false; > [webView goBack]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > decidedPolicy = false; > [webView goForward]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeBackForward, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -231,12 +231,12 @@ TEST(WebKit, DecidePolicyForNavigationAc > > createdWebView = false; > [webView loadHTMLString:@"<script>window.open('http://webkit.org/destination.html')</script>" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&createdWebView); >+ TestWebKitAPI::runUntil(createdWebView); > } > > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeOther, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -260,11 +260,11 @@ TEST(WebKit, DecidePolicyForNavigationAc > > finishedNavigation = false; > [webView loadHTMLString:@"<a style=\"display: block; height: 100%\" href=\"https://webkit.org/destination2.html\" target=\"B\">" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > createdWebView = false; > [webView evaluateJavaScript:@"window.open(\"https://webkit.org/destination1.html\", \"B\")" completionHandler:nil]; >- TestWebKitAPI::Util::run(&createdWebView); >+ TestWebKitAPI::runUntil(createdWebView); > > EXPECT_EQ(WKNavigationTypeOther, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -276,14 +276,14 @@ TEST(WebKit, DecidePolicyForNavigationAc > // Wait for newWebView to ask to load its initial document. > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; > NSPoint clickPoint = NSMakePoint(100, 100); > [[webView hitTest:clickPoint] mouseDown:[NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; > [[webView hitTest:clickPoint] mouseUp:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeLinkActivated, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -310,7 +310,7 @@ TEST(WebKit, DecidePolicyForNavigationAc > finishedNavigation = false; > decidedPolicy = false; > [webView loadHTMLString:@"TEST" baseURL:[NSURL URLWithString:@"about:blank"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > EXPECT_TRUE(decidedPolicy); > } > >@@ -347,11 +347,11 @@ TEST(WebKit, DecidePolicyForNavigationAc > > finishedNavigation = false; > [webView loadHTMLString:@"<a style=\"display: block; height: 100%\" href=\"javascript:window.open('https://webkit.org/destination2.html', 'B')\">" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > createdWebView = false; > [webView evaluateJavaScript:@"window.open(\"https://webkit.org/destination1.html\", \"B\")" completionHandler:nil]; >- TestWebKitAPI::Util::run(&createdWebView); >+ TestWebKitAPI::runUntil(createdWebView); > > EXPECT_EQ(WKNavigationTypeOther, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -363,14 +363,14 @@ TEST(WebKit, DecidePolicyForNavigationAc > // Wait for newWebView to ask to load its initial document. > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; > NSPoint clickPoint = NSMakePoint(100, 100); > [[webView hitTest:clickPoint] mouseDown:[NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; > [[webView hitTest:clickPoint] mouseUp:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeOther, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -396,11 +396,11 @@ TEST(WebKit, DecidePolicyForNavigationAc > > finishedNavigation = false; > [webView loadHTMLString:@"<form action=\"https://webkit.org/destination1.html\" target=\"B\"><input type=\"submit\" name=\"submit\" value=\"Submit\" style=\"-webkit-appearance: none; height: 100%; width: 100%\"></form>" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > createdWebView = false; > [webView evaluateJavaScript:@"window.open(\"https://webkit.org/destination2.html\", \"B\")" completionHandler:nil]; >- TestWebKitAPI::Util::run(&createdWebView); >+ TestWebKitAPI::runUntil(createdWebView); > > EXPECT_EQ(WKNavigationTypeOther, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -412,13 +412,13 @@ TEST(WebKit, DecidePolicyForNavigationAc > // Wait for newWebView to ask to load its initial document. > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > decidedPolicy = false; > NSPoint clickPoint = NSMakePoint(100, 100); > [[webView hitTest:clickPoint] mouseDown:[NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; > [[webView hitTest:clickPoint] mouseUp:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeFormSubmitted, [action navigationType]); > EXPECT_TRUE([action sourceFrame] != [action targetFrame]); >@@ -453,14 +453,14 @@ static void runDecidePolicyForNavigation > [TestProtocol registerWithScheme:@"http"]; > finishedNavigation = false; > [webView loadHTMLString:@"<a style=\"display: block; height: 100%\" href=\"http://redirect/?result\">" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; > NSPoint clickPoint = NSMakePoint(100, 100); > [[webView hitTest:clickPoint] mouseDown:[NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; > [[webView hitTest:clickPoint] mouseUp:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeLinkActivated, [action navigationType]); > EXPECT_TRUE([action sourceFrame] == [action targetFrame]); >@@ -473,7 +473,7 @@ static void runDecidePolicyForNavigation > > // Wait to decide policy for redirect. > decidedPolicy = false; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeLinkActivated, [action navigationType]); > EXPECT_TRUE([action sourceFrame] == [action targetFrame]); >@@ -512,12 +512,12 @@ TEST(WebKit, DecidePolicyForNavigationAc > > finishedNavigation = false; > [webView loadHTMLString:@"<form action=\"http://redirect/?result\" method=\"POST\"><input type=\"submit\" name=\"submitButton\" value=\"Submit\"></form>" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > [TestProtocol registerWithScheme:@"http"]; > decidedPolicy = false; > [webView evaluateJavaScript:@"document.forms[0].submit()" completionHandler:nil]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeFormSubmitted, [action navigationType]); > EXPECT_TRUE([action sourceFrame] == [action targetFrame]); >@@ -530,7 +530,7 @@ TEST(WebKit, DecidePolicyForNavigationAc > > // Wait to decide policy for redirect. > decidedPolicy = false; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeFormSubmitted, [action navigationType]); > EXPECT_TRUE([action sourceFrame] == [action targetFrame]); >@@ -559,12 +559,12 @@ TEST(WebKit, DecidePolicyForNavigationAc > > finishedNavigation = false; > [webView loadHTMLString:@"<form action=\"http://307-redirect/?result\" method=\"POST\"><input type=\"submit\" name=\"submitButton\" value=\"Submit\"></form>" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > > [TestProtocol registerWithScheme:@"http"]; > decidedPolicy = false; > [webView evaluateJavaScript:@"document.forms[0].submit()" completionHandler:nil]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeFormSubmitted, [action navigationType]); > EXPECT_TRUE([action sourceFrame] == [action targetFrame]); >@@ -577,7 +577,7 @@ TEST(WebKit, DecidePolicyForNavigationAc > > // Wait to decide policy for redirect. > decidedPolicy = false; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > > EXPECT_EQ(WKNavigationTypeFormSubmitted, [action navigationType]); > EXPECT_TRUE([action sourceFrame] == [action targetFrame]); >@@ -625,7 +625,7 @@ TEST(WebKit, DecidePolicyForNavigationAc > auto delegate = adoptNS([[DecidePolicyForNavigationActionFragmentDelegate alloc] init]); > [webView setNavigationDelegate:delegate.get()]; > [webView loadHTMLString:@"<script>window.location.href='#fragment';</script>" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm (working copy) >@@ -110,7 +110,7 @@ static void runDeviceOrientationTest(Dev > > [webView evaluateJavaScript:@"DeviceOrientationEvent.requestPermission().then((granted) => { webkit.messageHandlers.testHandler.postMessage(granted) });" completionHandler: [&] (id result, NSError *error) { }]; > >- TestWebKitAPI::Util::run(&didReceiveMessage); >+ TestWebKitAPI::runUntil(didReceiveMessage); > didReceiveMessage = false; > > switch (deviceOrientationPermission) { >@@ -128,13 +128,13 @@ static void runDeviceOrientationTest(Dev > addedEventListener = true; > }]; > >- TestWebKitAPI::Util::run(&addedEventListener); >+ TestWebKitAPI::runUntil(addedEventListener); > addedEventListener = false; > > [webView _simulateDeviceOrientationChangeWithAlpha:1.0 beta:2.0 gamma:3.0]; > > if (deviceOrientationPermission == DeviceOrientationPermission::Granted) { >- TestWebKitAPI::Util::run(&didReceiveMessage); >+ TestWebKitAPI::runUntil(didReceiveMessage); > EXPECT_WK_STREQ(@"received-event", receivedMessages.get()[1]); > } else { > TestWebKitAPI::Util::sleep(0.1); >@@ -176,7 +176,7 @@ TEST(DeviceOrientation, RememberPermissi > > [webView evaluateJavaScript:@"DeviceOrientationEvent.requestPermission().then((granted) => { webkit.messageHandlers.testHandler.postMessage(granted) });" completionHandler: [&] (id result, NSError *error) { }]; > >- TestWebKitAPI::Util::run(&didReceiveMessage); >+ TestWebKitAPI::runUntil(didReceiveMessage); > didReceiveMessage = false; > > EXPECT_TRUE(askedClientForPermission); >@@ -192,7 +192,7 @@ TEST(DeviceOrientation, RememberPermissi > > [webView _evaluateJavaScriptWithoutUserGesture:@"DeviceOrientationEvent.requestPermission().then((granted) => { webkit.messageHandlers.testHandler.postMessage(granted) }, (error) => { webkit.messageHandlers.testHandler.postMessage('error'); });" completionHandler: [&] (id result, NSError *error) { }]; > >- TestWebKitAPI::Util::run(&didReceiveMessage); >+ TestWebKitAPI::runUntil(didReceiveMessage); > didReceiveMessage = false; > > EXPECT_WK_STREQ(@"granted", receivedMessages.get()[1]); >@@ -212,7 +212,7 @@ TEST(DeviceOrientation, RememberPermissi > > [webView evaluateJavaScript:@"DeviceOrientationEvent.requestPermission().then((granted) => { webkit.messageHandlers.testHandler.postMessage(granted) });" completionHandler: [&] (id result, NSError *error) { }]; > >- TestWebKitAPI::Util::run(&didReceiveMessage); >+ TestWebKitAPI::runUntil(didReceiveMessage); > didReceiveMessage = false; > > EXPECT_TRUE(askedClientForPermission); >@@ -226,7 +226,7 @@ TEST(DeviceOrientation, RememberPermissi > > [webView evaluateJavaScript:@"DeviceOrientationEvent.requestPermission().then((granted) => { webkit.messageHandlers.testHandler.postMessage(granted) });" completionHandler: [&] (id result, NSError *error) { }]; > >- TestWebKitAPI::Util::run(&didReceiveMessage); >+ TestWebKitAPI::runUntil(didReceiveMessage); > didReceiveMessage = false; > > EXPECT_TRUE(askedClientForPermission); >@@ -242,7 +242,7 @@ TEST(DeviceOrientation, RememberPermissi > > [webView _evaluateJavaScriptWithoutUserGesture:@"DeviceOrientationEvent.requestPermission().then((granted) => { webkit.messageHandlers.testHandler.postMessage(granted) }, (error) => { webkit.messageHandlers.testHandler.postMessage('error'); });" completionHandler: [&] (id result, NSError *error) { }]; > >- TestWebKitAPI::Util::run(&didReceiveMessage); >+ TestWebKitAPI::runUntil(didReceiveMessage); > didReceiveMessage = false; > > EXPECT_WK_STREQ(@"granted", receivedMessages.get()[4]); >@@ -269,7 +269,7 @@ TEST(DeviceOrientation, FireOrientationE > // Request permission. > [webView evaluateJavaScript:@"DeviceOrientationEvent.requestPermission().then((granted) => { webkit.messageHandlers.testHandler.postMessage(granted) });" completionHandler: [&] (id result, NSError *error) { }]; > >- TestWebKitAPI::Util::run(&didReceiveMessage); >+ TestWebKitAPI::runUntil(didReceiveMessage); > didReceiveMessage = false; > > EXPECT_TRUE(askedClientForPermission); >@@ -289,14 +289,14 @@ TEST(DeviceOrientation, FireOrientationE > addedEventListener = true; > }]; > >- TestWebKitAPI::Util::run(&addedEventListener); >+ TestWebKitAPI::runUntil(addedEventListener); > addedEventListener = false; > > // Simulate a device orientation event. The page's event listener should get called even though it did not request permission, > // because it was previously granted permission during this browsing session. > [webView _simulateDeviceOrientationChangeWithAlpha:1.0 beta:2.0 gamma:3.0]; > >- TestWebKitAPI::Util::run(&didReceiveMessage); >+ TestWebKitAPI::runUntil(didReceiveMessage); > EXPECT_WK_STREQ(@"received-event", receivedMessages.get()[1]); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/DoAfterNextPresentationUpdateAfterCrash.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/DoAfterNextPresentationUpdateAfterCrash.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/DoAfterNextPresentationUpdateAfterCrash.mm (working copy) >@@ -50,7 +50,7 @@ TEST(WebKit, DoAfterNextPresentationUpda > [webView loadHTMLString:@"test" baseURL:nil]; > [webView _test_waitForDidFinishNavigation]; > >- TestWebKitAPI::Util::run(&gotCallback); >+ TestWebKitAPI::runUntil(gotCallback); > } > > TEST(WebKit, DoAfterNextStablePresentationUpdateAfterCrash) >@@ -70,7 +70,7 @@ TEST(WebKit, DoAfterNextStablePresentati > [webView loadHTMLString:@"test" baseURL:nil]; > [webView _test_waitForDidFinishNavigation]; > >- TestWebKitAPI::Util::run(&gotCallback); >+ TestWebKitAPI::runUntil(gotCallback); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm (working copy) >@@ -78,7 +78,7 @@ - (UIWKDocumentContext *)synchronouslyRe > result = context; > finished = true; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > return result.autorelease(); > } > >@@ -88,7 +88,7 @@ - (void)synchronouslyAdjustSelectionWith > [[self wkContentView] adjustSelectionWithDelta:range completionHandler:^() { > finished = true; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > } > > - (NSArray<_WKTextInputContext *> *)synchronouslyRequestTextInputContextsInRect:(CGRect)rect >@@ -99,7 +99,7 @@ - (NSArray<_WKTextInputContext *> *)sync > result = contexts; > finished = true; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > return result.autorelease(); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm (working copy) >@@ -111,20 +111,20 @@ TEST(WebKit, DoubleDefersLoading) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"defers://host/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"defers://host/main1.html#fragment"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView _setDefersLoadingForTesting:YES]; > [webView goBack]; > [webView _setDefersLoadingForTesting:NO]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm (working copy) >@@ -142,7 +142,7 @@ static void runTest(id <WKNavigationDele > hasReceivedResponse = false; > expectedUserInitiatedState = false; > [webView loadRequest:[NSURLRequest requestWithURL:url]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > @interface DownloadNavigationDelegate : NSObject <WKNavigationDelegate> >@@ -281,7 +281,7 @@ TEST(_WKDownload, OriginatingWebView) > } > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > @interface DownloadRequestOriginalURLDelegate : NSObject <_WKDownloadDelegate> >@@ -355,7 +355,7 @@ TEST(_WKDownload, DownloadRequestOrigina > [webView loadRequest:[NSURLRequest requestWithURL:contentURL]]; > [webView loadRequest:[NSURLRequest requestWithURL:sourceURL]]; > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > @interface BlobDownloadDelegate : NSObject <_WKDownloadDelegate> >@@ -520,7 +520,7 @@ TEST(_WKDownload, RedirectedDownload) > [webView objectByEvaluatingJavaScriptWithUserGesture:@"document.getElementById('link').click();"]; > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > EXPECT_EQ(1U, redirectCount); > > [TestProtocol unregister]; >@@ -543,7 +543,7 @@ TEST(_WKDownload, RedirectedLoadConverte > redirectCount = 0; > hasReceivedResponse = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://redirect/?redirect/?pass"]]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > EXPECT_EQ(0U, redirectCount); > > [TestProtocol unregister]; >@@ -566,7 +566,7 @@ TEST(_WKDownload, RedirectedSubframeLoad > redirectCount = 0; > hasReceivedResponse = false; > [webView loadHTMLString:@"<body><iframe src='http://redirect/?redirect/?pass'></iframe></body>" baseURL:nil]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > EXPECT_EQ(0U, redirectCount); > > [TestProtocol unregister]; >@@ -598,7 +598,7 @@ - (void)_downloadDidCancel:(_WKDownload > - (void)_download:(_WKDownload *)download decideDestinationWithSuggestedFilename:(NSString *)filename completionHandler:(void (^)(BOOL allowOverwrite, NSString *destination))completionHandler > { > [download cancel]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > completionHandler(YES, @"/tmp/WebKitAPITest/_WKDownload"); > downloadHasDecidedDestination = true; > } >@@ -619,7 +619,7 @@ TEST(_WKDownload, DownloadCanceledWhileD > downloadHasDecidedDestination = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://pass"]]]; > >- TestWebKitAPI::Util::run(&downloadHasDecidedDestination); >+ TestWebKitAPI::runUntil(downloadHasDecidedDestination); > > [TestProtocol unregister]; > } >@@ -676,14 +676,14 @@ - (instancetype)init > > - (void)waitForDidFinishNavigation > { >- TestWebKitAPI::Util::run(&_didFinishNavigation); >+ TestWebKitAPI::runUntil(_didFinishNavigation); > _didStartProvisionalNavigation = false; > _didFinishNavigation = false; > } > > - (void)waitForDownloadDidStart > { >- TestWebKitAPI::Util::run(&_downloadDidStart); >+ TestWebKitAPI::runUntil(_downloadDidStart); > } > > - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation >@@ -771,11 +771,11 @@ TEST(_WKDownload, CrashAfterDownloadDidF > [webView loadRequest:[NSURLRequest requestWithURL:sourceURL]]; > > didDownloadStart = false; >- TestWebKitAPI::Util::run(&didDownloadStart); >+ TestWebKitAPI::runUntil(didDownloadStart); > } > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > EXPECT_NULL(processPool.get()); > } > >@@ -868,13 +868,13 @@ void downloadAtRate(double desiredKbps, > auto webView = webViewWithDownloadMonitorSpeedMultiplier(speedMultiplier); > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://127.0.0.1:%d/", server.port()]]]]; > receivedData = false; >- Util::run(&receivedData); >+ runUntil(receivedData); > // Start the DownloadMonitor's timer. > [[webView configuration].processPool _synthesizeAppIsBackground:YES]; > if (returnToForeground == AppReturnsToForeground::Yes) > [[webView configuration].processPool _synthesizeAppIsBackground:NO]; > didCancel = false; >- Util::run(&didCancel); >+ runUntil(didCancel); > terminateServer = true; > [[NSFileManager defaultManager] removeItemAtURL:[NSURL fileURLWithPath:destination.get() isDirectory:NO] error:nil]; > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm (working copy) >@@ -222,12 +222,12 @@ - (void)subscribeAndWaitForProgress > m_progressSubscriber = [NSProgress addSubscriberForFileURL:m_progressURL.get() withPublishingHandler:publishingHandler.get()]; > #endif > } >- TestWebKitAPI::Util::run(&m_hasProgress); >+ TestWebKitAPI::runUntil(m_hasProgress); > } > > - (void)waitToLoseProgress > { >- TestWebKitAPI::Util::run(&m_lostProgress); >+ TestWebKitAPI::runUntil(m_lostProgress); > } > > - (void)startDownload:(DownloadStartType)startType expectedLength:(NSInteger)expectedLength >@@ -252,7 +252,7 @@ - (void)startDownload:(DownloadStartType > break; > } > >- TestWebKitAPI::Util::run(&m_downloadStarted); >+ TestWebKitAPI::runUntil(m_downloadStarted); > } > > - (void)publishProgress >@@ -285,27 +285,27 @@ - (void)failDownloadTask > > - (void)waitForDownloadDidCreateDestination > { >- TestWebKitAPI::Util::run(&m_downloadDidCreateDestination); >+ TestWebKitAPI::runUntil(m_downloadDidCreateDestination); > } > > - (void)waitForDownloadFinished > { >- TestWebKitAPI::Util::run(&m_downloadFinished); >+ TestWebKitAPI::runUntil(m_downloadFinished); > } > > - (void)waitForDownloadCanceled > { >- TestWebKitAPI::Util::run(&m_downloadCanceled); >+ TestWebKitAPI::runUntil(m_downloadCanceled); > } > > - (void)waitForDownloadFailed > { >- TestWebKitAPI::Util::run(&m_downloadFailed); >+ TestWebKitAPI::runUntil(m_downloadFailed); > } > > - (int64_t)waitForUpdatedCompletedUnitCount > { >- TestWebKitAPI::Util::run(&m_hasUpdatedCompletedUnitCount); >+ TestWebKitAPI::runUntil(m_hasUpdatedCompletedUnitCount); > m_hasUpdatedCompletedUnitCount = false; > > return m_progress.get().completedUnitCount; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm (working copy) >@@ -203,8 +203,8 @@ TEST(DragAndDropTests, ColorInputEvents) > }]; > > [simulator runFrom:CGPointMake(50, 50) to:CGPointMake(150, 50)]; >- TestWebKitAPI::Util::run(&inputEventFired); >- TestWebKitAPI::Util::run(&changeEventFired); >+ TestWebKitAPI::runUntil(inputEventFired); >+ TestWebKitAPI::runUntil(changeEventFired); > } > > #endif // ENABLE(INPUT_TYPE_COLOR) >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm (working copy) >@@ -134,5 +134,5 @@ TEST(WebKit, DuplicateCompletionHandlerC > [webView _setInputDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"duplicate-completion-handler-calls" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&testFinished); >+ runUntil(testFinished); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm (working copy) >@@ -81,19 +81,19 @@ TEST(ExitFullscreenOnEnterPiP, VideoFull > > didEnterFullscreen = false; > [webView evaluateJavaScript:@"document.getElementById('enter-video-fullscreen').click()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&didEnterFullscreen); >+ TestWebKitAPI::runUntil(didEnterFullscreen); > ASSERT_TRUE(didEnterFullscreen); > > didEnterPiP = false; > didExitFullscreen = false; > [webView evaluateJavaScript:@"document.getElementById('enter-pip').click()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&didEnterPiP); >- TestWebKitAPI::Util::run(&didExitFullscreen); >+ TestWebKitAPI::runUntil(didEnterPiP); >+ TestWebKitAPI::runUntil(didExitFullscreen); > > sleep(1_s); // Wait for PIPAgent to launch, or it won't call -pipDidClose: callback. > > [webView evaluateJavaScript:@"document.getElementById('exit-pip').click()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&didExitPiP); >+ TestWebKitAPI::runUntil(didExitPiP); > } > > >@@ -111,25 +111,25 @@ TEST(ExitFullscreenOnEnterPiP, ElementFu > > didEnterFullscreen = false; > [webView evaluateJavaScript:@"document.getElementById('enter-element-fullscreen').click()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&didEnterFullscreen); >+ TestWebKitAPI::runUntil(didEnterFullscreen); > ASSERT_TRUE(didEnterFullscreen); > > // Make the video the "main content" by playing with a user gesture. > __block bool didBeginPlaying = false; > [webView performAfterReceivingMessage:@"playing" action:^{ didBeginPlaying = true; }]; > [webView evaluateJavaScript:@"document.getElementById('play').click()" completionHandler:nil]; >- TestWebKitAPI::Util::run(&didBeginPlaying); >+ TestWebKitAPI::runUntil(didBeginPlaying); > > didEnterPiP = false; > didExitFullscreen = false; > [webView evaluateJavaScript:@"document.getElementById('enter-pip').click()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&didEnterPiP); >- TestWebKitAPI::Util::run(&didExitFullscreen); >+ TestWebKitAPI::runUntil(didEnterPiP); >+ TestWebKitAPI::runUntil(didExitFullscreen); > > sleep(1_s); // Wait for PIPAgent to launch, or it won't call -pipDidClose: callback. > > [webView evaluateJavaScript:@"document.getElementById('exit-pip').click()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&didExitPiP); >+ TestWebKitAPI::runUntil(didExitPiP); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm (working copy) >@@ -73,7 +73,7 @@ static FindResult findMatches(WKWebView > done = true; > }]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > return result; > } >@@ -88,7 +88,7 @@ static NSUInteger replaceMatches(WKWebVi > done = true; > }]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > return result; > } > >@@ -115,7 +115,7 @@ TEST(WebKit, FindInPage) > EXPECT_EQ(image.size.height, CGImageGetHeight(CGImage) / 2); > generateTextImageDone = true; > }]; >- TestWebKitAPI::Util::run(&generateTextImageDone); >+ TestWebKitAPI::runUntil(generateTextImageDone); > > // Find one match, doing an incremental search. > result = findMatches(webView.get(), @"Birthday", noFindOptions, 1); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/FixedLayoutSize.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/FixedLayoutSize.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/FixedLayoutSize.mm (working copy) >@@ -54,7 +54,7 @@ TEST(WebKit, FixedLayoutSize) > }]; > }]; > >- TestWebKitAPI::Util::run(&fixedLayoutSizeDone); >+ TestWebKitAPI::runUntil(fixedLayoutSizeDone); > > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; >@@ -66,7 +66,7 @@ TEST(WebKit, FixedLayoutSize) > fixedLayoutSizeAfterNavigationDone = true; > }]; > >- TestWebKitAPI::Util::run(&fixedLayoutSizeAfterNavigationDone); >+ TestWebKitAPI::runUntil(fixedLayoutSizeAfterNavigationDone); > > [webView _setLayoutMode:_WKLayoutModeViewSize]; > [webView evaluateJavaScript:@"document.body.clientWidth" completionHandler:^(id result, NSError *error) { >@@ -74,7 +74,7 @@ TEST(WebKit, FixedLayoutSize) > fixedLayoutSizeDisabledDone = true; > }]; > >- TestWebKitAPI::Util::run(&fixedLayoutSizeDisabledDone); >+ TestWebKitAPI::runUntil(fixedLayoutSizeDisabledDone); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm (working copy) >@@ -98,19 +98,19 @@ TEST(Fullscreen, Delegate) > > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"FullscreenDelegate" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedLoadedMessage); >+ TestWebKitAPI::runUntil(receivedLoadedMessage); > > NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:NSMakePoint(5, 5) modifierFlags:0 timestamp:0 windowNumber:window.get().windowNumber context:0 eventNumber:0 clickCount:0 pressure:0]; > [webView mouseDown:event]; > > ASSERT_FALSE([webView _isInFullscreen]); >- TestWebKitAPI::Util::run(&receivedWillEnterFullscreenMessage); >- TestWebKitAPI::Util::run(&receivedDidEnterFullscreenMessage); >+ TestWebKitAPI::runUntil(receivedWillEnterFullscreenMessage); >+ TestWebKitAPI::runUntil(receivedDidEnterFullscreenMessage); > > ASSERT_TRUE([webView _isInFullscreen]); > [webView mouseDown:event]; >- TestWebKitAPI::Util::run(&receivedWillExitFullscreenMessage); >- TestWebKitAPI::Util::run(&receivedDidExitFullscreenMessage); >+ TestWebKitAPI::runUntil(receivedWillExitFullscreenMessage); >+ TestWebKitAPI::runUntil(receivedDidExitFullscreenMessage); > > ASSERT_FALSE([webView _isInFullscreen]); > } >@@ -138,15 +138,15 @@ TEST(Fullscreen, WKViewDelegate) > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("FullscreenDelegate", "html")); > WKPageLoadURL(webView.page(), url.get()); > >- TestWebKitAPI::Util::run(&receivedLoadedMessage); >+ TestWebKitAPI::runUntil(receivedLoadedMessage); > > webView.simulateButtonClick(kWKEventMouseButtonLeftButton, 5, 5, 0); >- TestWebKitAPI::Util::run(&receivedWillEnterFullscreenMessage); >- TestWebKitAPI::Util::run(&receivedDidEnterFullscreenMessage); >+ TestWebKitAPI::runUntil(receivedWillEnterFullscreenMessage); >+ TestWebKitAPI::runUntil(receivedDidEnterFullscreenMessage); > > webView.simulateButtonClick(kWKEventMouseButtonLeftButton, 5, 5, 0); >- TestWebKitAPI::Util::run(&receivedWillExitFullscreenMessage); >- TestWebKitAPI::Util::run(&receivedDidExitFullscreenMessage); >+ TestWebKitAPI::runUntil(receivedWillExitFullscreenMessage); >+ TestWebKitAPI::runUntil(receivedDidExitFullscreenMessage); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm (working copy) >@@ -73,19 +73,19 @@ TEST(Fullscreen, LayoutConstraints) > > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"FullscreenLayoutConstraints" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedLoadedMessage); >+ TestWebKitAPI::runUntil(receivedLoadedMessage); > > NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:NSMakePoint(5, 5) modifierFlags:0 timestamp:0 windowNumber:window.get().windowNumber context:0 eventNumber:0 clickCount:0 pressure:0]; > [webView mouseDown:event]; > >- TestWebKitAPI::Util::run(&receivedFullscreenChangeMessage); >+ TestWebKitAPI::runUntil(receivedFullscreenChangeMessage); > > receivedFullscreenChangeMessage = false; > > NSEvent *exitFSEvent = [NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:NSMakePoint(5, 5) modifierFlags:0 timestamp:0 windowNumber:window.get().windowNumber context:0 eventNumber:0 clickCount:0 pressure:0]; > [webView mouseDown:exitFSEvent]; > >- TestWebKitAPI::Util::run(&receivedFullscreenChangeMessage); >+ TestWebKitAPI::runUntil(receivedFullscreenChangeMessage); > > NSArray* finalConstraints = [[window contentView] constraints]; > ASSERT_TRUE([originalConstraints isEqual:finalConstraints]); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenTopContentInset.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenTopContentInset.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenTopContentInset.mm (working copy) >@@ -69,18 +69,18 @@ TEST(Fullscreen, TopContentInset) > > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"FullscreenTopContentInset" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedLoadedMessage); >+ TestWebKitAPI::runUntil(receivedLoadedMessage); > > NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:NSMakePoint(5, 5) modifierFlags:0 timestamp:0 windowNumber:window.get().windowNumber context:0 eventNumber:0 clickCount:0 pressure:0]; > [webView mouseDown:event]; > >- TestWebKitAPI::Util::run(&receivedFullscreenChangeMessage); >+ TestWebKitAPI::runUntil(receivedFullscreenChangeMessage); > ASSERT_EQ(window.get().screen.frame.size.width, webView.get().frame.size.width); > ASSERT_EQ(window.get().screen.frame.size.height + webView.get()._topContentInset, webView.get().frame.size.height); > > receivedFullscreenChangeMessage = false; > [webView mouseDown:event]; >- TestWebKitAPI::Util::run(&receivedFullscreenChangeMessage); >+ TestWebKitAPI::runUntil(receivedFullscreenChangeMessage); > ASSERT_EQ(10, webView.get()._topContentInset); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/Geolocation.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/Geolocation.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/Geolocation.mm (working copy) >@@ -160,7 +160,7 @@ TEST(WebKit, GeolocationDeniedByLocation > hasReceivedAlert = false; > [webView loadTestPageNamed:@"GeolocationGetCurrentPositionResult"]; > >- TestWebKitAPI::Util::run(&hasReceivedAlert); >+ TestWebKitAPI::runUntil(hasReceivedAlert); > > EXPECT_WK_STREQ(uiDelegate.get().alertMessage, "ERROR:1"); > EXPECT_TRUE(coreLocationProvider.get().authorizationWasRequested); >@@ -184,7 +184,7 @@ TEST(WebKit, GeolocationDeniedByAPI) > hasReceivedAlert = false; > [webView loadTestPageNamed:@"GeolocationGetCurrentPositionResult"]; > >- TestWebKitAPI::Util::run(&hasReceivedAlert); >+ TestWebKitAPI::runUntil(hasReceivedAlert); > > EXPECT_WK_STREQ(uiDelegate.get().alertMessage, "ERROR:1"); > EXPECT_TRUE(coreLocationProvider.get().authorizationWasRequested); >@@ -208,7 +208,7 @@ TEST(WebKit, GeolocationAllowedByAPI) > hasReceivedAlert = false; > [webView loadTestPageNamed:@"GeolocationGetCurrentPositionResult"]; > >- TestWebKitAPI::Util::run(&hasReceivedAlert); >+ TestWebKitAPI::runUntil(hasReceivedAlert); > > EXPECT_WK_STREQ(uiDelegate.get().alertMessage, "SUCCESS"); > EXPECT_TRUE(coreLocationProvider.get().authorizationWasRequested); >@@ -233,7 +233,7 @@ TEST(WebKit, GeolocationError) > hasReceivedAlert = false; > [webView loadTestPageNamed:@"GeolocationGetCurrentPositionResult"]; > >- TestWebKitAPI::Util::run(&hasReceivedAlert); >+ TestWebKitAPI::runUntil(hasReceivedAlert); > > EXPECT_WK_STREQ(uiDelegate.get().alertMessage, "ERROR:2"); > EXPECT_TRUE(coreLocationProvider.get().authorizationWasRequested); >@@ -258,7 +258,7 @@ TEST(WebKit, DuplicateGeolocationAuthori > hasReceivedAlert = false; > [webView loadTestPageNamed:@"GeolocationGetCurrentPositionResult"]; > >- TestWebKitAPI::Util::run(&hasReceivedAlert); >+ TestWebKitAPI::runUntil(hasReceivedAlert); > > EXPECT_WK_STREQ(uiDelegate.get().alertMessage, "SUCCESS"); > EXPECT_TRUE(coreLocationProvider.get().authorizationWasRequested); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm (working copy) >@@ -138,7 +138,7 @@ public: > NSString *script = [NSString stringWithFormat:@"promptForCapture(%@)", constraints]; > [m_webView stringByEvaluatingJavaScript:script]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > if (shouldSucceed) { > EXPECT_STREQ([(NSString *)[lastScriptMessage body] UTF8String], "allowed"); > EXPECT_TRUE(haveStream(true)); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/GetResourceData.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/GetResourceData.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/GetResourceData.mm (working copy) >@@ -51,7 +51,7 @@ TEST(WebKit, GetPDFResourceData) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WebKit, GetPDFResourceDataInUnparentedWebView) >@@ -70,7 +70,7 @@ TEST(WebKit, GetPDFResourceDataInUnparen > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm (working copy) >@@ -76,7 +76,7 @@ TEST(IndexedDB, DeleteRecovery) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IDBDeleteRecovery" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > > EXPECT_WK_STREQ(@"Deleted database", [lastScriptMessage body]); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm (working copy) >@@ -79,7 +79,7 @@ TEST(IndexedDB, IndexUpgradeToV2) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IDBIndexUpgradeToV2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > > EXPECT_WK_STREQ(@"Object expected to be a blob: [object Blob]", [lastScriptMessage body]); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm (working copy) >@@ -173,8 +173,8 @@ TEST(IconLoading, DefaultFavicon) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"testing:///main"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&doneWithIcons); >- TestWebKitAPI::Util::run(&iconDelegate.get()->receivedFaviconDataCallback); >+ TestWebKitAPI::runUntil(doneWithIcons); >+ TestWebKitAPI::runUntil(iconDelegate.get()->receivedFaviconDataCallback); > > auto* faviconParameters = iconDelegate.get()->favicon.get(); > EXPECT_WK_STREQ("testing:///favicon.ico", faviconParameters.url.absoluteString); >@@ -216,7 +216,7 @@ TEST(IconLoading, AlreadyCachedIcon) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"testing:///main"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&iconDelegate.get()->receivedFaviconDataCallback); >+ TestWebKitAPI::runUntil(iconDelegate.get()->receivedFaviconDataCallback); > > EXPECT_TRUE([iconDataFromDisk.get() isEqual:iconDelegate.get()->receivedFaviconData.get()]); > >@@ -227,7 +227,7 @@ TEST(IconLoading, AlreadyCachedIcon) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"testing:///main2"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&iconDelegate.get()->receivedFaviconDataCallback); >+ TestWebKitAPI::runUntil(iconDelegate.get()->receivedFaviconDataCallback); > > EXPECT_TRUE([iconDataFromDisk.get() isEqual:iconDelegate.get()->receivedFaviconData.get()]); > } >@@ -249,15 +249,15 @@ TEST(IconLoading, IconLoadCancelledCallb > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"testing:///main"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&handler.get()->receivedFaviconTask); >+ TestWebKitAPI::runUntil(handler.get()->receivedFaviconTask); > > // Our scheme handler never replies to the favicon task, so our icon delegate load callback is still pending. > // Stop the documentloader's loading and verify the icon delegate callback is called. > [webView stopLoading]; > > // Wait until the data callback is called, *and* the task is stopped >- TestWebKitAPI::Util::run(&handler.get()->faviconTaskStopped); >- TestWebKitAPI::Util::run(&iconDelegate.get()->receivedFaviconDataCallback); >+ TestWebKitAPI::runUntil(handler.get()->faviconTaskStopped); >+ TestWebKitAPI::runUntil(iconDelegate.get()->receivedFaviconDataCallback); > > EXPECT_EQ(iconDelegate.get()->receivedFaviconData.get().length, (unsigned long)0); > } >@@ -279,7 +279,7 @@ TEST(IconLoading, IconLoadCancelledCallb > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"testing:///main"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&iconDelegate.get()->didSaveCallback); >+ TestWebKitAPI::runUntil(iconDelegate.get()->didSaveCallback); > > // Our scheme handler never replies to the favicon task, so our icon delegate load callback is still pending. > // Stop the documentloader's loading and verify the icon delegate callback is called. >@@ -295,5 +295,5 @@ TEST(IconLoading, IconLoadCancelledCallb > *iconCallbackCalled = true; > }); > >- TestWebKitAPI::Util::run(&iconCallbackCalled); >+ TestWebKitAPI::runUntil(iconCallbackCalled); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm (working copy) >@@ -89,7 +89,7 @@ TEST(IndexedDB, DatabaseProcessKill) > break; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > if (!killedDBProcess && openRequestUpgradeNeeded) { > killedDBProcess = true; > [configuration.get().processPool _terminateNetworkProcess]; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm (working copy) >@@ -61,7 +61,7 @@ static void runTest() > [webView loadRequest:request]; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > RetainPtr<NSString> string = (NSString *)[lastScriptMessage body]; > EXPECT_WK_STREQ(@"Success", string.get()); > >@@ -70,7 +70,7 @@ static void runTest() > [webView loadRequest:request]; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > RetainPtr<NSString> string2 = (NSString *)[lastScriptMessage body]; > EXPECT_WK_STREQ(@"Success", string2.get()); > >@@ -179,13 +179,13 @@ TEST(IndexedDB, IndexedDBFileNameAPI) > readyToContinue = true; > }]; > readyToContinue = false; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[NSSet setWithObjects:WKWebsiteDataTypeIndexedDBDatabases, nil] modifiedSince:[NSDate distantPast] completionHandler:^() { > readyToContinue = true; > }]; > readyToContinue = false; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > auto defaultFileManager = [NSFileManager defaultManager]; > NSURL *idbRootURL = [[WKWebsiteDataStore defaultDataStore] _indexedDBDatabaseDirectory]; >@@ -211,7 +211,7 @@ TEST(IndexedDB, IndexedDBFileHashCollisi > [webView loadRequest:request]; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > RetainPtr<NSString> string = (NSString *)[lastScriptMessage body]; > EXPECT_WK_STREQ(@"Error", string.get()); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm (working copy) >@@ -57,7 +57,7 @@ static WKScriptMessage *getNextMessage() > { > if (scriptMessages.isEmpty()) { > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > } > > return [[scriptMessages.takeFirst() retain] autorelease]; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm (working copy) >@@ -64,11 +64,11 @@ TEST(IndexedDB, IndexedDBPersistence) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IndexedDBPersistence-1" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > RetainPtr<NSString> string1 = (NSString *)[lastScriptMessage body]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > RetainPtr<NSString> string2 = (NSString *)[lastScriptMessage body]; > >@@ -84,7 +84,7 @@ TEST(IndexedDB, IndexedDBPersistence) > request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IndexedDBPersistence-2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > RetainPtr<NSString> string3 = (NSString *)[lastScriptMessage body]; > >@@ -107,11 +107,11 @@ TEST(IndexedDB, IndexedDBPersistencePriv > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IndexedDBPersistence-1" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > RetainPtr<NSString> string1 = (NSString *)[lastScriptMessage body]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > RetainPtr<NSString> string2 = (NSString *)[lastScriptMessage body]; > >@@ -125,7 +125,7 @@ TEST(IndexedDB, IndexedDBPersistencePriv > request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IndexedDBPersistence-2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > RetainPtr<NSString> string3 = (NSString *)[lastScriptMessage body]; > >@@ -145,14 +145,14 @@ TEST(IndexedDB, IndexedDBDataRemoval) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:websiteDataTypes.get() modifiedSince:[NSDate distantPast] completionHandler:^() { > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > readyToContinue = false; > [[WKWebsiteDataStore defaultDataStore] fetchDataRecordsOfTypes:websiteDataTypes.get() completionHandler:^(NSArray<WKWebsiteDataRecord *> *dataRecords) { > readyToContinue = true; > ASSERT_EQ(0u, dataRecords.count); > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > receivedScriptMessage = false; > auto handler = adoptNS([[IndexedDBMessageHandler alloc] init]); >@@ -161,7 +161,7 @@ TEST(IndexedDB, IndexedDBDataRemoval) > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IndexedDBPersistence-1" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > > readyToContinue = false; > [[WKWebsiteDataStore defaultDataStore] fetchDataRecordsOfTypes:websiteDataTypes.get() completionHandler:^(NSArray<WKWebsiteDataRecord *> *dataRecords) { >@@ -170,12 +170,12 @@ TEST(IndexedDB, IndexedDBDataRemoval) > readyToContinue = true; > }]; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > readyToContinue = false; > [[WKWebsiteDataStore defaultDataStore] fetchDataRecordsOfTypes:websiteDataTypes.get() completionHandler:^(NSArray<WKWebsiteDataRecord *> *dataRecords) { > readyToContinue = true; > ASSERT_EQ(0u, dataRecords.count); > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBStructuredCloneBackwardCompatibility.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBStructuredCloneBackwardCompatibility.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBStructuredCloneBackwardCompatibility.mm (working copy) >@@ -57,7 +57,7 @@ static WKScriptMessage *getNextMessage() > { > if (scriptMessages.isEmpty()) { > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > } > > return [[scriptMessages.takeFirst() retain] autorelease]; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm (working copy) >@@ -58,7 +58,7 @@ - (void)userContentController:(WKUserCon > static void runTestAndCheckResult(NSString* expectedResult) > { > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > RetainPtr<NSString> string = (NSString *)[lastScriptMessage body]; > EXPECT_WK_STREQ(expectedResult, string.get()); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBTempFileSize.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBTempFileSize.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBTempFileSize.mm (working copy) >@@ -78,7 +78,7 @@ TEST(IndexedDB, IndexedDBTempFileSize) > readyToContinue = true; > }]; > readyToContinue = false; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > // Do some IndexedDB operations to generate WAL file. > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); >@@ -86,11 +86,11 @@ TEST(IndexedDB, IndexedDBTempFileSize) > [webView loadRequest:request]; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > RetainPtr<NSString> string1 = (NSString *)[lastScriptMessage body]; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > RetainPtr<NSString> string2 = (NSString *)[lastScriptMessage body]; > > // Terminate network process to keep WAL on disk. >@@ -107,7 +107,7 @@ TEST(IndexedDB, IndexedDBTempFileSize) > [webView loadRequest:request]; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > RetainPtr<NSString> string3 = (NSString *)[lastScriptMessage body]; > > fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:walFilePath.get().path error:nil]; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBUserDelete.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBUserDelete.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBUserDelete.mm (working copy) >@@ -67,14 +67,14 @@ TEST(IndexedDB, IndexedDBUserDelete) > [webView loadRequest:request]; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > RetainPtr<NSString> string = (NSString *)[lastScriptMessage body]; > > [configuration.get().websiteDataStore removeDataOfTypes:[NSSet setWithObjects:WKWebsiteDataTypeIndexedDBDatabases, nil] modifiedSince:[NSDate distantPast] completionHandler:^() { > readyToContinue = true; > }]; > readyToContinue = false; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > EXPECT_WK_STREQ(@"Continue", string.get()); > } >@@ -93,5 +93,5 @@ TEST(IndexedDB, IndexedDBUserDeleteBefor > readyToContinue = true; > }]; > readyToContinue = false; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm (working copy) >@@ -43,7 +43,7 @@ TEST(WebKit, JITEnabled) > done = true; > }]; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > }; > > auto processPoolConfiguration = adoptNS([_WKProcessPoolConfiguration new]); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/JavaScriptDuringNavigation.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/JavaScriptDuringNavigation.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/JavaScriptDuringNavigation.mm (working copy) >@@ -87,8 +87,8 @@ TEST(WebKit, JavaScriptDuringNavigation) > [webView setUIDelegate:delegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:firstURL.get()]]; >- TestWebKitAPI::Util::run(&navigationComplete); >+ TestWebKitAPI::runUntil(navigationComplete); > > [webView loadRequest:[NSURLRequest requestWithURL:secondURL.get()]]; >- TestWebKitAPI::Util::run(&receivedBothAlerts); >+ TestWebKitAPI::runUntil(receivedBothAlerts); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm (working copy) >@@ -68,15 +68,15 @@ TEST(WKWebView, LoadAlternateHTMLStringF > [webView setNavigationDelegate:controller.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:unloadableURL]]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:loadableURL]]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > [webView goBack]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > WKBackForwardList *list = [webView backForwardList]; >@@ -90,7 +90,7 @@ TEST(WKWebView, LoadAlternateHTMLStringF > return; > > [webView goForward]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > EXPECT_EQ((NSUInteger)1, list.backList.count); >@@ -113,7 +113,7 @@ TEST(WKWebView, LoadAlternateHTMLStringF > [webView loadRequest:[NSURLRequest requestWithURL:targetURL]]; > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > // In success, we should only start 2 provisional loads: 1 for the second loadRequest, and 1 for the _loadAlternateHTMLString. > // The second loadRequest cancels the first one before its provisional load starts. > EXPECT_EQ(2, provisionalLoadCount); >@@ -134,19 +134,19 @@ TEST(WKWebView, LoadAlternateHTMLStringF > > NSURL *invalidURL = [NSURL URLWithString:@"https://www.example.com%3C%3E/"]; > [webView loadRequest:[NSURLRequest requestWithURL:invalidURL]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > [webView reload]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > [webView reloadFromOrigin]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > [webView _reloadExpiredOnly]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > WKBackForwardList *list = [webView backForwardList]; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm (working copy) >@@ -65,5 +65,5 @@ TEST(WKWebView, LoadFileThenReload) > [webView loadFileURL:file allowingReadAccessToURL:file.URLByDeletingLastPathComponent]; > [webView reload]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm (working copy) >@@ -75,7 +75,7 @@ TEST(WebKit, LoadInvalidURLRequest) > > didFinishTest = false; > didFailProvisionalLoad = false; >- Util::run(&didFinishTest); >+ runUntil(didFinishTest); > > EXPECT_TRUE(didFailProvisionalLoad); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm (working copy) >@@ -65,7 +65,7 @@ TEST(WKWebView, LocalStorageClear) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"LocalStorageClear" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > readyToContinue = false; > > webView = nil; >@@ -88,7 +88,7 @@ TEST(WKWebView, LocalStorageClear) > readyToContinue = true; > }]; > >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > } > > static long long fileSize(NSURL* url) >@@ -136,7 +136,7 @@ TEST(WKWebView, ClearAppCache) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > // Start with a clean slate of Website caches. > if (auto *websiteCacheDirectory = defaultWebsiteCacheDirectory()) { >@@ -188,7 +188,7 @@ TEST(WKWebView, ClearAppCache) > originalWebsiteDataRecordCount = websiteDataRecords.count; > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > readyToContinue = false; > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() >@@ -204,5 +204,5 @@ TEST(WKWebView, ClearAppCache) > readyToContinue = true; > }]; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm (working copy) >@@ -51,14 +51,14 @@ TEST(WKWebView, LocalStorageFetchDataRec > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > readyToContinue = false; > auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > webView.get().UIDelegate = [[[LocalStorageUIDelegate alloc] init] autorelease]; > [webView loadHTMLString:@"<script>localStorage.setItem('testKey', 'testValue');alert(localStorage.getItem('testKey'));</script>" baseURL:[NSURL URLWithString:@"http://localhost"]]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > // Local storage database update interval is 1 second. > TestWebKitAPI::Util::sleep(1); >@@ -71,5 +71,5 @@ TEST(WKWebView, LocalStorageFetchDataRec > ASSERT_EQ(1u, origins.count); > EXPECT_STREQ("http://localhost", [origins objectAtIndex:0].UTF8String); > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageNullEntries.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageNullEntries.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageNullEntries.mm (working copy) >@@ -74,7 +74,7 @@ TEST(WKWebView, LocalStorageNullEntries) > [webView loadRequest:request]; > > readyToContinue = false; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > webView = nil; > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm (working copy) >@@ -60,7 +60,7 @@ TEST(WKWebView, LocalStorageEmptyString) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > @autoreleasepool { > RetainPtr<LocalStorageMessageHandler> handler = adoptNS([[LocalStorageMessageHandler alloc] init]); >@@ -73,7 +73,7 @@ TEST(WKWebView, LocalStorageEmptyString) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"localstorage-empty-string-value" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > RetainPtr<NSString> string1 = (NSString *)[lastScriptMessage body]; > EXPECT_WK_STREQ(@"setItem EmptyString", string1.get()); >@@ -96,7 +96,7 @@ TEST(WKWebView, LocalStorageEmptyString) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"localstorage-empty-string-value" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > RetainPtr<NSString> string2 = (NSString *)[lastScriptMessage body]; > EXPECT_WK_STREQ(@"", string2.get()); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageQuirkTest.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageQuirkTest.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageQuirkTest.mm (working copy) >@@ -67,7 +67,7 @@ TEST(WKWebView, LocalStorageQuirkEnabled > [webView loadRequest:request]; > > readyToContinue = false; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > webView = nil; > >@@ -90,7 +90,7 @@ TEST(WKWebView, LocalStorageQuirkDisable > [webView loadRequest:request]; > > readyToContinue = false; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > webView = nil; > >@@ -113,7 +113,7 @@ TEST(WKWebView, LocalStorageQuirkDisable > [webView loadRequest:request]; > > readyToContinue = false; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > webView = nil; > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm (working copy) >@@ -61,7 +61,7 @@ TEST(WebKit, MediaBufferingPolicy) > [webView performAfterReceivingMessage:@"playing" action:^() { isPlaying = true; }]; > > [webView synchronouslyLoadTestPageNamed:@"video-with-audio"]; >- TestWebKitAPI::Util::run(&isPlaying); >+ TestWebKitAPI::runUntil(isPlaying); > > waitUntilBufferingPolicyIsEqualTo(webView.get(), "Default"); > >@@ -92,7 +92,7 @@ TEST(WebKit, MediaBufferingPolicy) > // Policy should go back to default when playback starts. > isPlaying = false; > [webView stringByEvaluatingJavaScript:@"go()"]; >- TestWebKitAPI::Util::run(&isPlaying); >+ TestWebKitAPI::runUntil(isPlaying); > > waitUntilBufferingPolicyIsEqualTo(webView.get(), "Default"); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm (working copy) >@@ -57,7 +57,7 @@ TEST(MessagePort, Providers) > [wk1View.get() setFrameLoadDelegate:delegate.get()]; > [[wk1View mainFrame] loadHTMLString:@"<script>new MessageChannel;</script>" baseURL:nil]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > // Now using a WKWebView to load content that uses message ports will use the WK2-style message ports. > // This should not conflict with WK1-style message ports. >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm (working copy) >@@ -139,5 +139,5 @@ TEST(WebKit, ModalAlerts) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"modal-alerts-in-new-about-blank-window" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm (working copy) >@@ -94,7 +94,7 @@ TEST(WKNavigation, LoadRequest) > ASSERT_TRUE([[currentNavigation _request] isEqual:request]); > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > @interface DidFailProvisionalNavigationDelegate : NSObject <WKNavigationDelegate> >@@ -140,7 +140,7 @@ TEST(WKNavigation, DidFailProvisionalNav > ASSERT_TRUE([[currentNavigation _request] isEqual:request]); > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > @interface CrashReasonDelegate : NSObject <WKNavigationDelegate> >@@ -166,7 +166,7 @@ TEST(WKNavigation, CrashReason) > [webView loadHTMLString:@"<html>start the web process</html>" baseURL:[NSURL URLWithString:@"https://webkit.org/"]]; > [webView _killWebContentProcessAndResetState]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > @interface DecidePolicyForPageCacheNavigationDelegate : NSObject <WKNavigationDelegate> >@@ -201,17 +201,17 @@ TEST(WKNavigation, DecidePolicyForPageCa > > isDone = false; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"data:text/html,2"]]; > > isDone = false; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > isDone = false; > [webView goBack]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > ASSERT_TRUE([delegate decidedPolicyForBackForwardNavigation]); > } >@@ -249,7 +249,7 @@ TEST(WKNavigation, NavigationActionHasNa > > isDone = false; > delegate->navigation = [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > @interface ClientRedirectNavigationDelegate : NSObject<WKNavigationDelegatePrivate> >@@ -284,7 +284,7 @@ TEST(WKNavigation, WebViewWillPerformCli > redirectURL = nil; > redirectDelay = 0; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > ASSERT_DOUBLE_EQ(redirectDelay, 123); > ASSERT_STREQ(redirectURL.get().absoluteString.UTF8String, "data:text/html,Page1"); >@@ -294,7 +294,7 @@ TEST(WKNavigation, WebViewWillPerformCli > redirectURL = nil; > redirectDelay = NSTimeIntervalSince1970; // Use any non-zero value, we will test that the delegate receives a delay of 0. > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > ASSERT_DOUBLE_EQ(redirectDelay, 0); > ASSERT_STREQ(redirectURL.get().absoluteString.UTF8String, "data:text/html,Page2"); >@@ -314,7 +314,7 @@ TEST(WKNavigation, WebViewDidCancelClien > isDone = false; > didCancelRedirect = false; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > ASSERT_FALSE(didCancelRedirect); > >@@ -325,12 +325,12 @@ TEST(WKNavigation, WebViewDidCancelClien > isDone = false; > didCancelRedirect = false; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > ASSERT_FALSE(didCancelRedirect); > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > ASSERT_TRUE(didCancelRedirect); > >@@ -342,14 +342,14 @@ TEST(WKNavigation, WebViewDidCancelClien > isDone = false; > didCancelRedirect = false; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > ASSERT_FALSE(didCancelRedirect); > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"data:text/html,Page4"]]; > isDone = false; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > ASSERT_TRUE(didCancelRedirect); > } >@@ -382,12 +382,12 @@ TEST(WKNavigation, WillGoToBackForwardLi > auto delegate = adoptNS([[BackForwardDelegate alloc] init]); > [webView setNavigationDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- TestWebKitAPI::Util::run(&navigationComplete); >+ TestWebKitAPI::runUntil(navigationComplete); > navigationComplete = false; > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- TestWebKitAPI::Util::run(&navigationComplete); >+ TestWebKitAPI::runUntil(navigationComplete); > [webView goBack]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > RetainPtr<WKBackForwardListItem> firstItem; >@@ -438,11 +438,11 @@ TEST(WKNavigation, ListItemAddedRemoved) > auto delegate = adoptNS([[ListItemDelegate alloc] init]); > [webView setNavigationDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- TestWebKitAPI::Util::run(&navigationComplete); >+ TestWebKitAPI::runUntil(navigationComplete); > navigationComplete = false; > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- TestWebKitAPI::Util::run(&navigationComplete); >+ TestWebKitAPI::runUntil(navigationComplete); > [[webView backForwardList] _removeAllItems]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > #endif // PLATFORM(MAC) >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm (working copy) >@@ -63,13 +63,13 @@ - (void)waitForNavigationActionCallback > { > _navigationAction = nullptr; > _hasReceivedNavigationCallback = false; >- TestWebKitAPI::Util::run(&_hasReceivedNavigationCallback); >+ TestWebKitAPI::runUntil(_hasReceivedNavigationCallback); > } > > - (void)waitForDidFinishNavigation > { > _hasFinishedNavigation = false; >- TestWebKitAPI::Util::run(&_hasFinishedNavigation); >+ TestWebKitAPI::runUntil(_hasFinishedNavigation); > } > > - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm (working copy) >@@ -67,10 +67,10 @@ TEST(WebKit, NetworkProcessCrashNonPersi > [webView setNavigationDelegate:delegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:simple]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [[webView configuration].processPool _terminateNetworkProcess]; > [webView loadRequest:[NSURLRequest requestWithURL:simple2]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm (working copy) >@@ -73,7 +73,7 @@ static RetainPtr<MRNowPlayingClientRef> > nowPlayingClient = player; > gotNowPlaying = true; > }); >- TestWebKitAPI::Util::run(&gotNowPlaying); >+ TestWebKitAPI::runUntil(gotNowPlaying); > return nowPlayingClient; > } > >@@ -117,14 +117,14 @@ public: > { > bool complete = false; > [_webView evaluateJavaScript:script completionHandler:[&] (id, NSError *) { complete = true; }]; >- TestWebKitAPI::Util::run(&complete); >+ TestWebKitAPI::runUntil(complete); > } > > void runScriptWithoutUserGesture(const String& script) > { > bool complete = false; > [_webView _evaluateJavaScriptWithoutUserGesture:script completionHandler:[&] (id, NSError *) { complete = true; }]; >- TestWebKitAPI::Util::run(&complete); >+ TestWebKitAPI::runUntil(complete); > } > > void executeAndWaitForPlaying(Function<void()>&& callback) >@@ -132,7 +132,7 @@ public: > bool isPlaying = false; > [_webView performAfterReceivingMessage:@"playing" action:[&] { isPlaying = true; }]; > callback(); >- TestWebKitAPI::Util::run(&isPlaying); >+ TestWebKitAPI::runUntil(isPlaying); > } > > void executeAndWaitForWebViewToBecomeNowPlaying(Function<void()>&& callback) >@@ -146,7 +146,7 @@ public: > return true; > }); > callback(); >- TestWebKitAPI::Util::run(&becameNowPlaying); >+ TestWebKitAPI::runUntil(becameNowPlaying); > } > > private: >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm (working copy) >@@ -64,7 +64,7 @@ - (BOOL)hasActiveNowPlayingSession > > [self _requestActiveNowPlayingSessionInfo:completionHandler]; > >- TestWebKitAPI::Util::run(&_receivedNowPlayingInfoResponse); >+ TestWebKitAPI::runUntil(_receivedNowPlayingInfoResponse); > > return _hasActiveNowPlayingSession; > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ObservedRenderingProgressEventsAfterCrash.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ObservedRenderingProgressEventsAfterCrash.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ObservedRenderingProgressEventsAfterCrash.mm (working copy) >@@ -54,7 +54,7 @@ TEST(WebKit, ObservedRenderingProgressEv > [webView _setObservedRenderingProgressEvents:_WKRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering]; > [webView _killWebContentProcessAndResetState]; > [webView loadHTMLString:@"content" baseURL:nil]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm (working copy) >@@ -89,7 +89,7 @@ TEST(WebKit, OpenAndCloseWindow) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"open-and-close-window" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > @interface OpenAndCloseWindowUIDelegateAsync : OpenAndCloseWindowUIDelegate >@@ -152,7 +152,7 @@ TEST(WebKit, OpenAndCloseWindowAsync) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"open-and-close-window" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WebKit, OpenAsyncWithNil) >@@ -171,7 +171,7 @@ TEST(WebKit, OpenAsyncWithNil) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"open-and-close-window" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > // https://bugs.webkit.org/show_bug.cgi?id=171083 - Try to figure out why this fails for some configs but not others, and resolve. >@@ -190,7 +190,7 @@ TEST(WebKit, OpenAsyncWithNil) > // NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"open-and-close-window" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > // [webView loadRequest:request]; > // >-// TestWebKitAPI::Util::run(&isDone); >+// TestWebKitAPI::runUntil(isDone); > // > // bool caughtException = false; > // @try { >@@ -238,7 +238,7 @@ TEST(WebKit, OpenWindowFeatures) > NSString *windowOpenFormatString = @"window.open(\"about:blank\", \"_blank\", \"%@\")"; > > [webView evaluateJavaScript:@"window.open(\"about:blank\")" completionHandler:nil]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > // https://bugs.webkit.org/show_bug.cgi?id=174271 - WebCore currently doesn't distinguish between unspecified (nil) and false >@@ -255,7 +255,7 @@ TEST(WebKit, OpenWindowFeatures) > > NSString *featuresStringAllSpecifiedAndTrue = @"menubar=yes,status=yes,toolbar=yes,resizable=yes,location=yes,scrollbars=yes,fullscreen=yes"; > [webView evaluateJavaScript:[NSString stringWithFormat:windowOpenFormatString, featuresStringAllSpecifiedAndTrue] completionHandler:nil]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > EXPECT_TRUE([openWindowFeatures menuBarVisibility].boolValue); >@@ -269,7 +269,7 @@ TEST(WebKit, OpenWindowFeatures) > > NSString *featuresStringAllSpecifiedAndFalse = @"menubar=no,status=no,toolbar=no,resizable=no,location=no,scrollbars=no,fullscreen=no"; > [webView evaluateJavaScript:[NSString stringWithFormat:windowOpenFormatString, featuresStringAllSpecifiedAndFalse] completionHandler:nil]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > EXPECT_FALSE([openWindowFeatures menuBarVisibility].boolValue); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm (working copy) >@@ -86,7 +86,7 @@ static void waitForDelay(Seconds delay) > dispatch_after(dispatch_time(DISPATCH_TIME_NOW, delay.nanoseconds()), dispatch_get_main_queue(), ^{ > done = true; > }); >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST(ParserYieldTokenTests, PreventDocumentLoadByTakingParserYieldToken) >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm (working copy) >@@ -65,8 +65,8 @@ - (void)waitForMessage:(NSString *)messa > [self evaluateJavaScript:script completionHandler:^(id, NSError *) { > evaluatedScript = true; > }]; >- TestWebKitAPI::Util::run(&evaluatedScript); >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(evaluatedScript); >+ TestWebKitAPI::runUntil(receivedMessage); > } > > @end >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm (working copy) >@@ -74,7 +74,7 @@ static void waitUntilOnLoadIsCompleted(W > while (!onLoadCompleted) { > fetchOnLoadedCompletedDone = false; > WKPageRunJavaScriptInMainFrame(page, TestWebKitAPI::Util::toWK("window.onloadcompleted !== undefined").get(), 0, onLoadedCompletedCallback); >- TestWebKitAPI::Util::run(&fetchOnLoadedCompletedDone); >+ TestWebKitAPI::runUntil(fetchOnLoadedCompletedDone); > } > } > >@@ -133,7 +133,7 @@ TEST(PictureInPicture, WKUIDelegate) > receivedLoadedMessage = false; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedLoadedMessage); >+ TestWebKitAPI::runUntil(receivedLoadedMessage); > > hasVideoInPictureInPictureValue = false; > hasVideoInPictureInPictureCalled = false; >@@ -149,7 +149,7 @@ TEST(PictureInPicture, WKUIDelegate) > [webView mouseDown:event]; > #endif > >- TestWebKitAPI::Util::run(&hasVideoInPictureInPictureCalled); >+ TestWebKitAPI::runUntil(hasVideoInPictureInPictureCalled); > ASSERT_TRUE(hasVideoInPictureInPictureValue); > > // Wait for PIPAgent to launch, or it won't call -pipDidClose: callback. >@@ -168,7 +168,7 @@ TEST(PictureInPicture, WKUIDelegate) > [webView mouseDown:event]; > #endif > >- TestWebKitAPI::Util::run(&hasVideoInPictureInPictureCalled); >+ TestWebKitAPI::runUntil(hasVideoInPictureInPictureCalled); > ASSERT_FALSE(hasVideoInPictureInPictureValue); > } > >@@ -228,20 +228,20 @@ TEST(PictureInPicture, WKPageUIClient) > receivedLoadedMessage = false; > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("PictureInPictureDelegate", "html")); > WKPageLoadURL(webView.page(), url.get()); >- TestWebKitAPI::Util::run(&receivedLoadedMessage); >+ TestWebKitAPI::runUntil(receivedLoadedMessage); > waitUntilOnLoadIsCompleted(webView.page()); > > hasVideoInPictureInPictureValue = false; > hasVideoInPictureInPictureCalled = false; > webView.simulateButtonClick(kWKEventMouseButtonLeftButton, 5, 5, 0); >- TestWebKitAPI::Util::run(&hasVideoInPictureInPictureCalled); >+ TestWebKitAPI::runUntil(hasVideoInPictureInPictureCalled); > ASSERT_TRUE(hasVideoInPictureInPictureValue); > > sleep(1_s); // Wait for PIPAgent to launch, or it won't call -pipDidClose: callback. > > hasVideoInPictureInPictureCalled = false; > webView.simulateButtonClick(kWKEventMouseButtonLeftButton, 5, 5, 0); >- TestWebKitAPI::Util::run(&hasVideoInPictureInPictureCalled); >+ TestWebKitAPI::runUntil(hasVideoInPictureInPictureCalled); > ASSERT_FALSE(hasVideoInPictureInPictureValue); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/PluginLoadClientPolicies.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/PluginLoadClientPolicies.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/PluginLoadClientPolicies.mm (working copy) >@@ -124,7 +124,7 @@ TEST(WebKit, PluginLoadClientPoliciesWit > }]; > [webView.platformView().browsingContextController loadHTMLString:@"<html><body><script>navigator.plugins.length;</script></body></html>" baseURL:[NSURL URLWithString:@"about:blank"]]; > >- TestWebKitAPI::Util::run(&testFinished); >+ TestWebKitAPI::runUntil(testFinished); > } > > #endif // WK_HAVE_C_SPI >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/Preferences.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/Preferences.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/Preferences.mm (working copy) >@@ -99,7 +99,7 @@ TEST(WebKit, WebGLEnabled) > auto webView = adoptNS([[WKWebView alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView loadHTMLString:html baseURL:nil]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > EXPECT_STREQ([delegate alert].UTF8String, "enabled"); > > receivedAlert = false; >@@ -108,7 +108,7 @@ TEST(WebKit, WebGLEnabled) > webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > [webView setUIDelegate:delegate.get()]; > [webView loadHTMLString:html baseURL:nil]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > EXPECT_STREQ([delegate alert].UTF8String, "disabled"); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm (working copy) >@@ -63,7 +63,7 @@ public: > __block bool isPlaying = false; > [webView performAfterReceivingMessage:@"playing" action:^() { isPlaying = true; }]; > [webView synchronouslyLoadTestPageNamed:name]; >- TestWebKitAPI::Util::run(&isPlaying); >+ TestWebKitAPI::runUntil(isPlaying); > EXPECT_EQ(expectedAudioBufferSize, preferredAudioBufferSize()); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/PrepareForMoveToWindow.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/PrepareForMoveToWindow.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/PrepareForMoveToWindow.mm (working copy) >@@ -52,7 +52,7 @@ TEST(WKWebView, PrepareForMoveToWindow) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > >@@ -73,7 +73,7 @@ TEST(WKWebView, PrepareForMoveToWindowTh > > [webView _close]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm (working copy) >@@ -47,7 +47,7 @@ TEST(WebKit, ProcessSuspendMediaBufferin > > [webView synchronouslyLoadTestPageNamed:@"video-with-audio"]; > >- TestWebKitAPI::Util::run(&isPlaying); >+ TestWebKitAPI::runUntil(isPlaying); > > auto isElementAllowedToBuffer = [&] { > return [webView stringByEvaluatingJavaScript:@"window.internals.elementShouldBufferData(document.querySelector('video'))"].boolValue; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm (working copy) >@@ -517,7 +517,7 @@ static void runBasicTest(SchemeHandlerSh > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView _webProcessIdentifier]; >@@ -525,7 +525,7 @@ static void runBasicTest(SchemeHandlerSh > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -533,7 +533,7 @@ static void runBasicTest(SchemeHandlerSh > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid3 = [webView _webProcessIdentifier]; >@@ -572,7 +572,7 @@ TEST(ProcessSwap, LoadAfterPolicyDecisio > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > navigationDelegate->decidePolicyForNavigationAction = ^(WKNavigationAction *, void (^decisionHandler)(WKNavigationActionPolicy)) { >@@ -611,7 +611,7 @@ TEST(ProcessSwap, KillWebContentProcessA > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > __block BOOL isRedirection = NO; >@@ -630,13 +630,13 @@ TEST(ProcessSwap, KillWebContentProcessA > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > TestWebKitAPI::Util::spinRunLoop(10); > [webView reload]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -657,7 +657,7 @@ TEST(ProcessSwap, NoSwappingForeTLDPlus2 > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www1.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView _webProcessIdentifier]; >@@ -665,7 +665,7 @@ TEST(ProcessSwap, NoSwappingForeTLDPlus2 > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www2.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -700,9 +700,9 @@ TEST(ProcessSwap, Back) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -710,7 +710,7 @@ TEST(ProcessSwap, Back) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -719,7 +719,7 @@ TEST(ProcessSwap, Back) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto googlePID = [webView _webProcessIdentifier]; >@@ -728,7 +728,7 @@ TEST(ProcessSwap, Back) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.bing.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto bingPID = [webView _webProcessIdentifier]; >@@ -736,9 +736,9 @@ TEST(ProcessSwap, Back) > > [webView goBack]; // Back to google.com. > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterFirstBackNavigation = [webView _webProcessIdentifier]; >@@ -746,9 +746,9 @@ TEST(ProcessSwap, Back) > > [webView goBack]; // Back to apple.com. > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterSecondBackNavigation = [webView _webProcessIdentifier]; >@@ -800,7 +800,7 @@ TEST(ProcessSwap, HistoryNavigationToFra > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -808,19 +808,19 @@ TEST(ProcessSwap, HistoryNavigationToFra > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html#foo"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; > > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); > > [webView goForward]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(applePID, [webView _webProcessIdentifier]); >@@ -831,7 +831,7 @@ TEST(ProcessSwap, HistoryNavigationToFra > EXPECT_WK_STREQ(@"TEST", innerText); > finishedRunningScript = true; > }]; >- TestWebKitAPI::Util::run(&finishedRunningScript); >+ TestWebKitAPI::runUntil(finishedRunningScript); > } > > TEST(ProcessSwap, SuspendedPageDiesAfterBackForwardListItemIsGone) >@@ -853,7 +853,7 @@ TEST(ProcessSwap, SuspendedPageDiesAfter > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -861,7 +861,7 @@ TEST(ProcessSwap, SuspendedPageDiesAfter > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -871,7 +871,7 @@ TEST(ProcessSwap, SuspendedPageDiesAfter > EXPECT_EQ(2U, [processPool _webProcessCountIgnoringPrewarmedAndCached]); > > [webView goBack]; // Back to webkit.org. >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -882,7 +882,7 @@ TEST(ProcessSwap, SuspendedPageDiesAfter > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -915,7 +915,7 @@ TEST(ProcessSwap, SuspendedPagesInActivi > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -924,13 +924,13 @@ TEST(ProcessSwap, SuspendedPagesInActivi > EXPECT_WK_STREQ(@"pson://www.webkit.org", activeDomains[0]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto googlePID = [webView _webProcessIdentifier]; >@@ -941,7 +941,7 @@ TEST(ProcessSwap, SuspendedPagesInActivi > EXPECT_WK_STREQ(@"pson://www.google.com", activeDomains[0]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [processPool _getActivePagesOriginsInWebProcessForTesting:webkitPID completionHandler:^(NSArray<NSString *> *activeDomains) { >@@ -949,14 +949,14 @@ TEST(ProcessSwap, SuspendedPagesInActivi > EXPECT_WK_STREQ(@"pson://www.webkit.org", activeDomains[0]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView goBack]; // Back to webkit.org. > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterBackNavigation = [webView _webProcessIdentifier]; >@@ -967,7 +967,7 @@ TEST(ProcessSwap, SuspendedPagesInActivi > EXPECT_WK_STREQ(@"pson://www.google.com", activeDomains[0]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [processPool _getActivePagesOriginsInWebProcessForTesting:webkitPID completionHandler:^(NSArray<NSString *> *activeDomains) { >@@ -975,7 +975,7 @@ TEST(ProcessSwap, SuspendedPagesInActivi > EXPECT_WK_STREQ(@"pson://www.webkit.org", activeDomains[0]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1002,9 +1002,9 @@ TEST(ProcessSwap, BackWithoutSuspendedPa > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView1 loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView1 _webProcessIdentifier]; >@@ -1020,16 +1020,16 @@ TEST(ProcessSwap, BackWithoutSuspendedPa > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView2 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView2 _webProcessIdentifier]; > > [webView2 goBack]; > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid3 = [webView2 _webProcessIdentifier]; >@@ -1055,7 +1055,7 @@ TEST(ProcessSwap, BackNavigationAfterSes > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView1 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView1 _webProcessIdentifier]; >@@ -1063,7 +1063,7 @@ TEST(ProcessSwap, BackNavigationAfterSes > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView1 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView1 _webProcessIdentifier]; >@@ -1077,14 +1077,14 @@ TEST(ProcessSwap, BackNavigationAfterSes > [webView2 setNavigationDelegate:delegate.get()]; > > [webView2 _restoreSessionState:sessionState.get() andNavigate:YES]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView2 URL] absoluteString]); > auto pid3 = [webView2 _webProcessIdentifier]; > > [webView2 goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.webkit.org/main.html", [[webView2 URL] absoluteString]); >@@ -1115,13 +1115,13 @@ TEST(ProcessSwap, CrossSiteWindowOpenNoO > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ(2, numberOfDecidePolicyCalls); > >@@ -1154,13 +1154,13 @@ TEST(ProcessSwap, CrossOriginButSameSite > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ(2, numberOfDecidePolicyCalls); > >@@ -1194,13 +1194,13 @@ TEST(ProcessSwap, CrossSiteWindowOpenWit > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ(2, numberOfDecidePolicyCalls); > >@@ -1232,13 +1232,13 @@ TEST(ProcessSwap, SameSiteWindowOpenNoOp > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ(2, numberOfDecidePolicyCalls); > >@@ -1271,13 +1271,13 @@ TEST(ProcessSwap, CrossSiteBlankTargetWi > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ(3, numberOfDecidePolicyCalls); > >@@ -1310,13 +1310,13 @@ TEST(ProcessSwap, CrossSiteBlankTargetIm > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ(3, numberOfDecidePolicyCalls); > >@@ -1349,13 +1349,13 @@ TEST(ProcessSwap, CrossSiteBlankTargetNo > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ(3, numberOfDecidePolicyCalls); > >@@ -1388,13 +1388,13 @@ TEST(ProcessSwap, SameSiteBlankTargetNoO > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ(3, numberOfDecidePolicyCalls); > >@@ -1426,12 +1426,12 @@ TEST(ProcessSwap, ServerRedirectFromNewW > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&serverRedirected); >+ TestWebKitAPI::runUntil(serverRedirected); > serverRedirected = false; > > seenPIDs.add([webView _webProcessIdentifier]); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > seenPIDs.add([webView _webProcessIdentifier]); >@@ -1459,7 +1459,7 @@ TEST(ProcessSwap, ServerRedirect) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterFirstLoad = [webView _webProcessIdentifier]; >@@ -1471,14 +1471,14 @@ TEST(ProcessSwap, ServerRedirect) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&serverRedirected); >+ TestWebKitAPI::runUntil(serverRedirected); > serverRedirected = false; > > seenPIDs.add([webView _webProcessIdentifier]); > if (auto provisionalPID = [webView _provisionalWebProcessIdentifier]) > seenPIDs.add(provisionalPID); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > seenPIDs.add([webView _webProcessIdentifier]); >@@ -1511,7 +1511,7 @@ TEST(ProcessSwap, ServerRedirect2) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterFirstLoad = [webView _webProcessIdentifier]; >@@ -1524,14 +1524,14 @@ TEST(ProcessSwap, ServerRedirect2) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&serverRedirected); >+ TestWebKitAPI::runUntil(serverRedirected); > serverRedirected = false; > > seenPIDs.add([webView _webProcessIdentifier]); > if (auto provisionalPID = [webView _provisionalWebProcessIdentifier]) > seenPIDs.add(provisionalPID); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > seenPIDs.add([webView _webProcessIdentifier]); >@@ -1546,7 +1546,7 @@ TEST(ProcessSwap, ServerRedirect2) > > [webView goBack]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.webkit.org/main1.html", [[webView URL] absoluteString]); >@@ -1570,7 +1570,7 @@ TEST(ProcessSwap, ServerRedirectToAboutB > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterFirstLoad = [webView _webProcessIdentifier]; >@@ -1582,14 +1582,14 @@ TEST(ProcessSwap, ServerRedirectToAboutB > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&serverRedirected); >+ TestWebKitAPI::runUntil(serverRedirected); > serverRedirected = false; > > seenPIDs.add([webView _webProcessIdentifier]); > if (auto provisionalPID = [webView _provisionalWebProcessIdentifier]) > seenPIDs.add(provisionalPID); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > seenPIDs.add([webView _webProcessIdentifier]); >@@ -1625,7 +1625,7 @@ static void runSameOriginServerRedirectT > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main3.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1641,13 +1641,13 @@ static void runSameOriginServerRedirectT > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&willPerformClientRedirect); >+ TestWebKitAPI::runUntil(willPerformClientRedirect); > > seenPIDs.add([webView _webProcessIdentifier]); > if (auto provisionalPID = [webView _provisionalWebProcessIdentifier]) > seenPIDs.add(provisionalPID); > >- TestWebKitAPI::Util::run(&didPerformClientRedirect); >+ TestWebKitAPI::runUntil(didPerformClientRedirect); > didPerformClientRedirect = false; > willPerformClientRedirect = false; > >@@ -1655,14 +1655,14 @@ static void runSameOriginServerRedirectT > if (auto provisionalPID = [webView _provisionalWebProcessIdentifier]) > seenPIDs.add(provisionalPID); > >- TestWebKitAPI::Util::run(&serverRedirected); >+ TestWebKitAPI::runUntil(serverRedirected); > serverRedirected = false; > > seenPIDs.add([webView _webProcessIdentifier]); > if (auto provisionalPID = [webView _provisionalWebProcessIdentifier]) > seenPIDs.add(provisionalPID); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > seenPIDs.add([webView _webProcessIdentifier]); >@@ -1701,7 +1701,7 @@ TEST(ProcessSwap, TerminateProcessRightA > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > delegate->didStartProvisionalNavigationHandler = ^{ >@@ -1748,7 +1748,7 @@ TEST(ProcessSwap, PolicyCancelAfterServe > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pidAfterFirstLoad = [webView _webProcessIdentifier]; > >@@ -1756,7 +1756,7 @@ TEST(ProcessSwap, PolicyCancelAfterServe > > [webView evaluateJavaScript:@"testLink.click()" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&failed); >+ TestWebKitAPI::runUntil(failed); > failed = false; > done = false; > >@@ -1770,7 +1770,7 @@ TEST(ProcessSwap, PolicyCancelAfterServe > EXPECT_WK_STREQ(@"Link", innerText); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1793,14 +1793,14 @@ TEST(ProcessSwap, CrossSiteDownload) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pidAfterFirstLoad = [webView _webProcessIdentifier]; > > shouldConvertToDownload = true; > [webView evaluateJavaScript:@"testLink.click()" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&failed); >+ TestWebKitAPI::runUntil(failed); > failed = false; > shouldConvertToDownload = false; > >@@ -1812,7 +1812,7 @@ TEST(ProcessSwap, CrossSiteDownload) > EXPECT_WK_STREQ(@"Link", innerText); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1855,7 +1855,7 @@ TEST(ProcessSwap, SameOriginSystemPrevie > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pidAfterFirstLoad = [webView _webProcessIdentifier]; > >@@ -1891,7 +1891,7 @@ TEST(ProcessSwap, CrossOriginSystemPrevi > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pidAfterFirstLoad = [webView _webProcessIdentifier]; > >@@ -1929,7 +1929,7 @@ static void runClientSideRedirectTest(Sh > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -1937,7 +1937,7 @@ static void runClientSideRedirectTest(Sh > // Navigate to the page doing a client-side redirect to apple.com. > [webView evaluateJavaScript:@"testLink.click()" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.google.com/clientSideRedirect.html", [[webView URL] absoluteString]); >@@ -1947,7 +1947,7 @@ static void runClientSideRedirectTest(Sh > else > EXPECT_EQ(webkitPID, googlePID); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView URL] absoluteString]); >@@ -1986,7 +1986,7 @@ static void runClientSideRedirectTest(Sh > > // Navigate back. > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.webkit.org/main.html", [[webView URL] absoluteString]); >@@ -2011,7 +2011,7 @@ static void runClientSideRedirectTest(Sh > > // Navigate forward. > [webView goForward]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView URL] absoluteString]); >@@ -2064,12 +2064,12 @@ TEST(ProcessSwap, CrossSiteClientSideRed > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"client-side-redirect" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView _webProcessIdentifier]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -2099,7 +2099,7 @@ TEST(ProcessSwap, NavigateBackAfterClien > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -2110,14 +2110,14 @@ TEST(ProcessSwap, NavigateBackAfterClien > // Navigate to the page doing a client-side redirect to apple.com. > [webView evaluateJavaScript:@"testLink.click()" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.google.com/clientSideRedirect.html", [[webView URL] absoluteString]); > auto googlePID = [webView _webProcessIdentifier]; > EXPECT_NE(webkitPID, googlePID); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView URL] absoluteString]); >@@ -2137,14 +2137,14 @@ TEST(ProcessSwap, NavigateBackAfterClien > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(applePID, [webView _webProcessIdentifier]); > > [webView goBack]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(applePID, [webView _webProcessIdentifier]); >@@ -2177,13 +2177,13 @@ static void runNavigationWithLockedHisto > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; > > // Page redirects to apple.com. >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -2200,9 +2200,9 @@ static void runNavigationWithLockedHisto > > receivedMessage = false; > [webView goBack]; >- TestWebKitAPI::Util::run(&receivedMessage); // Should be restored from PageCache. >+ TestWebKitAPI::runUntil(receivedMessage); // Should be restored from PageCache. > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -2212,8 +2212,8 @@ static void runNavigationWithLockedHisto > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [backForwardList.forwardItem.URL absoluteString]); > > [webView goForward]; >- TestWebKitAPI::Util::run(&done); >- TestWebKitAPI::Util::run(&receivedMessage); // Should be restored from PageCache. >+ TestWebKitAPI::runUntil(done); >+ TestWebKitAPI::runUntil(receivedMessage); // Should be restored from PageCache. > receivedMessage = false; > done = false; > >@@ -2250,7 +2250,7 @@ static void runQuickBackForwardNavigatio > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -2258,7 +2258,7 @@ static void runQuickBackForwardNavigatio > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -2266,7 +2266,7 @@ static void runQuickBackForwardNavigatio > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -2351,9 +2351,9 @@ TEST(ProcessSwap, SessionStorage) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -2361,7 +2361,7 @@ TEST(ProcessSwap, SessionStorage) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -2372,9 +2372,9 @@ TEST(ProcessSwap, SessionStorage) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We should have gone back to the webkit.org process for this load since we reuse SuspendedPages' process when possible. >@@ -2405,7 +2405,7 @@ TEST(ProcessSwap, ReuseSuspendedProcess) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -2413,7 +2413,7 @@ TEST(ProcessSwap, ReuseSuspendedProcess) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -2423,7 +2423,7 @@ TEST(ProcessSwap, ReuseSuspendedProcess) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We should have gone back to the webkit.org process for this load since we reuse SuspendedPages' process when possible. >@@ -2432,7 +2432,7 @@ TEST(ProcessSwap, ReuseSuspendedProcess) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We should have gone back to the apple.com process for this load since we reuse SuspendedPages' process when possible. >@@ -2457,14 +2457,14 @@ TEST(ProcessSwap, ReuseSuspendedProcessL > NSString *htmlString = @"<html><body>TEST</body></html>"; > [webView loadHTMLString:htmlString baseURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; > > [webView loadHTMLString:htmlString baseURL:[NSURL URLWithString:@"pson://www.apple.com/main1.html"]]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -2473,7 +2473,7 @@ TEST(ProcessSwap, ReuseSuspendedProcessL > > [webView loadHTMLString:htmlString baseURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We should have gone back to the webkit.org process for this load since we reuse SuspendedPages' process when possible. >@@ -2481,7 +2481,7 @@ TEST(ProcessSwap, ReuseSuspendedProcessL > > [webView loadHTMLString:htmlString baseURL:[NSURL URLWithString:@"pson://www.apple.com/main2.html"]]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We should have gone back to the apple.com process for this load since we reuse SuspendedPages' process when possible. >@@ -2515,7 +2515,7 @@ TEST(ProcessSwap, ReuseSuspendedProcessE > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -2523,7 +2523,7 @@ TEST(ProcessSwap, ReuseSuspendedProcessE > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -2533,7 +2533,7 @@ TEST(ProcessSwap, ReuseSuspendedProcessE > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We should have gone back to the webkit.org process for this load since we reuse SuspendedPages' process when possible. >@@ -2542,7 +2542,7 @@ TEST(ProcessSwap, ReuseSuspendedProcessE > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We should have gone back to the apple.com process for this load since we reuse SuspendedPages' process when possible. >@@ -2567,7 +2567,7 @@ TEST(ProcessSwap, ReuseSuspendedProcessO > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -2575,7 +2575,7 @@ TEST(ProcessSwap, ReuseSuspendedProcessO > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -2584,7 +2584,7 @@ TEST(ProcessSwap, ReuseSuspendedProcessO > > [webView goBack]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -2616,7 +2616,7 @@ TEST(ProcessSwap, HistoryItemIDConfusion > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -2624,7 +2624,7 @@ TEST(ProcessSwap, HistoryItemIDConfusion > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -2633,7 +2633,7 @@ TEST(ProcessSwap, HistoryItemIDConfusion > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto googlePID = [webView _webProcessIdentifier]; >@@ -2642,14 +2642,14 @@ TEST(ProcessSwap, HistoryItemIDConfusion > > [webView goBack]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(applePID, [webView _webProcessIdentifier]); > > [webView goBack]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -2682,7 +2682,7 @@ TEST(ProcessSwap, GoToSecondItemInBackHi > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -2690,7 +2690,7 @@ TEST(ProcessSwap, GoToSecondItemInBackHi > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -2698,21 +2698,21 @@ TEST(ProcessSwap, GoToSecondItemInBackHi > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; > EXPECT_NE(webkitPID, applePID); > > [webView goToBackForwardListItem:webView.get().backForwardList.backList[0]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); > EXPECT_WK_STREQ(@"pson://www.webkit.org/main1.html", [[webView URL] absoluteString]); > > [webView goToBackForwardListItem:webView.get().backForwardList.forwardList[1]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(applePID, [webView _webProcessIdentifier]); >@@ -2742,7 +2742,7 @@ TEST(ProcessSwap, PrivateAndRegularSessi > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [regularWebView1 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [regularWebView1 _close]; >@@ -2754,7 +2754,7 @@ TEST(ProcessSwap, PrivateAndRegularSessi > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [privateWebView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto privateSessionWebkitPID = [privateWebView _webProcessIdentifier]; >@@ -2762,7 +2762,7 @@ TEST(ProcessSwap, PrivateAndRegularSessi > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [privateWebView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto privateSessionApplePID = [privateWebView _webProcessIdentifier]; >@@ -2777,7 +2777,7 @@ TEST(ProcessSwap, PrivateAndRegularSessi > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [regularWebView2 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto regularSessionGooglePID = [regularWebView2 _webProcessIdentifier]; >@@ -2785,7 +2785,7 @@ TEST(ProcessSwap, PrivateAndRegularSessi > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [regularWebView2 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto regularSessionWebkitPID = [regularWebView2 _webProcessIdentifier]; >@@ -2844,7 +2844,7 @@ void testReuseSuspendedProcessForRegular > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -2852,7 +2852,7 @@ void testReuseSuspendedProcessForRegular > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -2861,7 +2861,7 @@ void testReuseSuspendedProcessForRegular > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -2923,7 +2923,7 @@ TEST(ProcessSwap, MainFramesOnly) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; > > EXPECT_EQ(1u, seenPIDs.size()); >@@ -2956,7 +2956,7 @@ static unsigned waitUntilClientWidthIs(W > clientWidth = [result integerValue]; > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > --timeout; > } while (clientWidth != expectedClientWidth && timeout >= 0); >@@ -2988,7 +2988,7 @@ TEST(ProcessSwap, PageZoomLevelAfterSwap > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > unsigned clientWidth = waitUntilClientWidthIs(webView.get(), 400); >@@ -2997,7 +2997,7 @@ TEST(ProcessSwap, PageZoomLevelAfterSwap > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > clientWidth = waitUntilClientWidthIs(webView.get(), 400); >@@ -3006,7 +3006,7 @@ TEST(ProcessSwap, PageZoomLevelAfterSwap > // Kill the WebProcess, the page should reload automatically and the page zoom level should be maintained. > kill([webView _webProcessIdentifier], 9); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > clientWidth = waitUntilClientWidthIs(webView.get(), 400); >@@ -3052,7 +3052,7 @@ TEST(ProcessSwap, NavigateCrossSiteBefor > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_FALSE(failed); >@@ -3079,7 +3079,7 @@ TEST(ProcessSwap, DoSameSiteNavigationAf > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -3094,7 +3094,7 @@ TEST(ProcessSwap, DoSameSiteNavigationAf > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.webkit.org/main2.html", [[webView URL] absoluteString]); >@@ -3121,31 +3121,31 @@ TEST(ProcessSwap, SuspendedPageLimit) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.bing.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.yahoo.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Navigations to 5 different domains, we expect to have seen 5 different PIDs >@@ -3184,7 +3184,7 @@ TEST(ProcessSwap, PageCache1) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterLoad1 = [webView _webProcessIdentifier]; >@@ -3194,7 +3194,7 @@ TEST(ProcessSwap, PageCache1) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterLoad2 = [webView _webProcessIdentifier]; >@@ -3203,9 +3203,9 @@ TEST(ProcessSwap, PageCache1) > EXPECT_NE(pidAfterLoad1, pidAfterLoad2); > > [webView goBack]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterLoad3 = [webView _webProcessIdentifier]; >@@ -3217,9 +3217,9 @@ TEST(ProcessSwap, PageCache1) > EXPECT_EQ(2u, seenPIDs.size()); > > [webView goForward]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterLoad4 = [webView _webProcessIdentifier]; >@@ -3253,7 +3253,7 @@ TEST(ProcessSwap, PageCacheWhenNavigatin > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterLoad1 = [webView _webProcessIdentifier]; >@@ -3263,7 +3263,7 @@ TEST(ProcessSwap, PageCacheWhenNavigatin > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterLoad2 = [webView _webProcessIdentifier]; >@@ -3272,9 +3272,9 @@ TEST(ProcessSwap, PageCacheWhenNavigatin > EXPECT_NE(pidAfterLoad1, pidAfterLoad2); > > [webView evaluateJavaScript:@"history.back()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterLoad3 = [webView _webProcessIdentifier]; >@@ -3286,9 +3286,9 @@ TEST(ProcessSwap, PageCacheWhenNavigatin > EXPECT_EQ(2u, seenPIDs.size()); > > [webView evaluateJavaScript:@"history.forward()" completionHandler: nil]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pidAfterLoad4 = [webView _webProcessIdentifier]; >@@ -3326,7 +3326,7 @@ TEST(ProcessSwap, UseWebProcessCacheAfte > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > webkitPID = [webView _webProcessIdentifier]; > } >@@ -3338,7 +3338,7 @@ TEST(ProcessSwap, UseWebProcessCacheAfte > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto applePID = [webView _webProcessIdentifier]; > >@@ -3352,14 +3352,14 @@ TEST(ProcessSwap, UseWebProcessCacheAfte > }]; > > kill(applePID, 9); >- TestWebKitAPI::Util::run(&webProcessTerminated); >+ TestWebKitAPI::runUntil(webProcessTerminated); > webProcessTerminated = false; > > EXPECT_EQ(0, [webView _webProcessIdentifier]); > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -3391,7 +3391,7 @@ TEST(ProcessSwap, UseWebProcessCacheForL > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > webkitPID = [webView _webProcessIdentifier]; > EXPECT_NE(0, webkitPID); >@@ -3408,7 +3408,7 @@ TEST(ProcessSwap, UseWebProcessCacheForL > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -3426,7 +3426,7 @@ TEST(ProcessSwap, UseWebProcessCacheForL > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_NE(webkitPID, [webView _webProcessIdentifier]); >@@ -3453,7 +3453,7 @@ TEST(ProcessSwap, NumberOfPrewarmedProce > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(2u, [processPool _webProcessCount]); >@@ -3462,7 +3462,7 @@ TEST(ProcessSwap, NumberOfPrewarmedProce > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(3u, [processPool _webProcessCount]); >@@ -3497,7 +3497,7 @@ TEST(ProcessSwap, NumberOfCachedProcesse > for (unsigned i = 0; i < maxSuspendedPageCount + 1; i++) { > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:makeString("pson://www.domain-", i, ".com")]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(i + 1, [processPool _webProcessCount]); >@@ -3507,7 +3507,7 @@ TEST(ProcessSwap, NumberOfCachedProcesse > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:makeString("pson://www.domain-", maxSuspendedPageCount + 1, ".com")]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > int timeout = 100; >@@ -3524,7 +3524,7 @@ TEST(ProcessSwap, NumberOfCachedProcesse > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate] modifiedSince:[NSDate distantPast] completionHandler:^() { > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > timeout = 100; > while ([processPool _webProcessCount] > 1 && timeout > 0) { >@@ -3577,29 +3577,29 @@ TEST(ProcessSwap, PageShowHide) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView goBack]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView goForward]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > while ([receivedMessages count] < 7) >@@ -3669,29 +3669,29 @@ TEST(ProcessSwap, LoadUnload) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView goBack]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView goForward]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > while ([receivedMessages count] < 7) >@@ -3741,7 +3741,7 @@ TEST(ProcessSwap, WebInspector) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView _webProcessIdentifier]; >@@ -3751,7 +3751,7 @@ TEST(ProcessSwap, WebInspector) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -3761,7 +3761,7 @@ TEST(ProcessSwap, WebInspector) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid3 = [webView _webProcessIdentifier]; >@@ -3803,14 +3803,14 @@ TEST(ProcessSwap, SameOriginBlobNavigati > numberOfDecidePolicyCalls = 0; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid1 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid1); > > [webView _evaluateJavaScriptWithoutUserGesture:@"document.getElementById('link').click()" completionHandler: nil]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid2 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid2); >@@ -3836,7 +3836,7 @@ TEST(ProcessSwap, CrossOriginBlobNavigat > > numberOfDecidePolicyCalls = 0; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid1 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid1); >@@ -3847,10 +3847,10 @@ TEST(ProcessSwap, CrossOriginBlobNavigat > blobURL = String([NSString stringWithFormat:@"%@", result]); > finishedRunningScript = true; > }]; >- TestWebKitAPI::Util::run(&finishedRunningScript); >+ TestWebKitAPI::runUntil(finishedRunningScript); > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid2 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid2); >@@ -3860,13 +3860,13 @@ TEST(ProcessSwap, CrossOriginBlobNavigat > [webView _evaluateJavaScriptWithoutUserGesture:(NSString *)script completionHandler: [&] (id result, NSError *error) { > finishedRunningScript = true; > }]; >- TestWebKitAPI::Util::run(&finishedRunningScript); >+ TestWebKitAPI::runUntil(finishedRunningScript); > > // This navigation will fail. > [webView _evaluateJavaScriptWithoutUserGesture:@"document.getElementById('link').click()" completionHandler: [&] (id result, NSError *error) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid3 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid3); >@@ -3894,13 +3894,13 @@ TEST(ProcessSwap, NavigateToAboutBlank) > > numberOfDecidePolicyCalls = 0; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid1 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid1); > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid2 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid2); >@@ -3927,13 +3927,13 @@ TEST(ProcessSwap, NavigateToDataURL) > > numberOfDecidePolicyCalls = 0; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid1 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid1); > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"data:text/plain,PASS"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid2 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid2); >@@ -3959,7 +3959,7 @@ TEST(ProcessSwap, ProcessReuse) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView _webProcessIdentifier]; >@@ -3967,7 +3967,7 @@ TEST(ProcessSwap, ProcessReuse) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -3975,7 +3975,7 @@ TEST(ProcessSwap, ProcessReuse) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid3 = [webView _webProcessIdentifier]; >@@ -4004,7 +4004,7 @@ TEST(ProcessSwap, ProcessReuseeTLDPlus2) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www1.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView _webProcessIdentifier]; >@@ -4012,7 +4012,7 @@ TEST(ProcessSwap, ProcessReuseeTLDPlus2) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -4020,7 +4020,7 @@ TEST(ProcessSwap, ProcessReuseeTLDPlus2) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www2.webkit.org/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid3 = [webView _webProcessIdentifier]; >@@ -4047,13 +4047,13 @@ TEST(ProcessSwap, ConcurrentHistoryNavig > [webView setNavigationDelegate:navigationDelegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView _webProcessIdentifier]; >@@ -4061,7 +4061,7 @@ TEST(ProcessSwap, ConcurrentHistoryNavig > EXPECT_NE(webkitPID, applePID); > > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); >@@ -4077,7 +4077,7 @@ TEST(ProcessSwap, ConcurrentHistoryNavig > [webView goForward]; > [webView goForward]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(applePID, [webView _webProcessIdentifier]); >@@ -4089,7 +4089,7 @@ TEST(ProcessSwap, ConcurrentHistoryNavig > EXPECT_WK_STREQ(@"pson://www.webkit.org/main.html", [backForwardList.backItem.URL absoluteString]); > > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_NE(applePID, [webView _webProcessIdentifier]); >@@ -4119,7 +4119,7 @@ TEST(ProcessSwap, NavigateToInvalidURL) > > numberOfDecidePolicyCalls = 0; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid1 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid1); >@@ -4129,7 +4129,7 @@ TEST(ProcessSwap, NavigateToInvalidURL) > [webView evaluateJavaScript:@"location.href = 'http://A=a%B=b'" completionHandler:nil]; > > didRepondToPolicyDecisionCall = false; >- TestWebKitAPI::Util::run(&didRepondToPolicyDecisionCall); >+ TestWebKitAPI::runUntil(didRepondToPolicyDecisionCall); > > TestWebKitAPI::Util::spinRunLoop(1); > >@@ -4175,15 +4175,15 @@ TEST(ProcessSwap, NavigateToDataURLThenB > > numberOfDecidePolicyCalls = 0; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid1 = [webView _webProcessIdentifier]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid2 = [webView _webProcessIdentifier]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid3 = [webView _webProcessIdentifier]; > >@@ -4209,19 +4209,19 @@ TEST(ProcessSwap, NavigateCrossSiteWithP > [webView setNavigationDelegate:navigationDelegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto webkitPID = [webView _webProcessIdentifier]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto applePID = [webView _webProcessIdentifier]; > > EXPECT_NE(webkitPID, applePID); > > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_NE(applePID, [webView _webProcessIdentifier]); >@@ -4239,13 +4239,13 @@ TEST(ProcessSwap, APIControlledProcessSw > > numberOfDecidePolicyCalls = 0; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/1"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid1 = [webView _webProcessIdentifier]; > > // Navigating from the above URL to this URL normally should not process swap. > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/2"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid2 = [webView _webProcessIdentifier]; > >@@ -4258,7 +4258,7 @@ TEST(ProcessSwap, APIControlledProcessSw > decisionHandler(_WKNavigationActionPolicyAllowInNewProcess); > }; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webit.org/3"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid3 = [webView _webProcessIdentifier]; > >@@ -4302,17 +4302,17 @@ TEST(ProcessSwap, NavigateToCrossSiteThe > > numberOfDecidePolicyCalls = 0; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto webkitPID = [webView _webProcessIdentifier]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto applePID = [webView _webProcessIdentifier]; > EXPECT_NE(webkitPID, applePID); // Should have process-swapped when going from webkit.org to apple.com. > > // Page now calls history.back() to navigate back to webkit.org. >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(3, numberOfDecidePolicyCalls); >@@ -4347,38 +4347,38 @@ TEST(ProcessSwap, SwapOnFormSubmission) > [webView setNavigationDelegate:navigationDelegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto webkitPID = [webView _webProcessIdentifier]; > EXPECT_WK_STREQ(@"pson://www.webkit.org/main.html", [[webView URL] absoluteString]); > > [webView evaluateJavaScript:@"submitButton.click()" completionHandler:nil]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto applePID = [webView _webProcessIdentifier]; > EXPECT_NE(webkitPID, applePID); > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView URL] absoluteString]); > > [webView reload]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > EXPECT_EQ(applePID, [webView _webProcessIdentifier]); > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView URL] absoluteString]); > > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); > EXPECT_WK_STREQ(@"pson://www.webkit.org/main.html", [[webView URL] absoluteString]); > > [webView goForward]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > EXPECT_EQ(applePID, [webView _webProcessIdentifier]); > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView URL] absoluteString]); > > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > #if !PLATFORM(IOS_FAMILY) > // This is not guaranteed on iOS because the WebProcess cache is disabled on devices with too little RAM. >@@ -4406,7 +4406,7 @@ TEST(ProcessSwap, ClosePageAfterCrossSit > [webView configuration].preferences._safeBrowsingEnabled = NO; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > didStartProvisionalLoad = false; >@@ -4419,7 +4419,7 @@ TEST(ProcessSwap, ClosePageAfterCrossSit > done = true; > }; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > TestWebKitAPI::Util::sleep(0.5); >@@ -4464,7 +4464,7 @@ TEST(ProcessSwap, LoadingStateAfterPolic > [webView configuration].preferences._safeBrowsingEnabled = NO; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto loadObserver = adoptNS([[PSONLoadingObserver alloc] init]); >@@ -4493,7 +4493,7 @@ TEST(ProcessSwap, LoadingStateAfterPolic > > EXPECT_EQ(1U, loadingStateChanges.size()); > >- TestWebKitAPI::Util::run(&didStartProvisionalLoad); >+ TestWebKitAPI::runUntil(didStartProvisionalLoad); > didStartProvisionalLoad = false; > > EXPECT_EQ(1U, loadingStateChanges.size()); >@@ -4502,7 +4502,7 @@ TEST(ProcessSwap, LoadingStateAfterPolic > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView URL] absoluteString]); > EXPECT_TRUE([webView isLoading]); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView URL] absoluteString]); >@@ -4542,14 +4542,14 @@ TEST(ProcessSwap, OpenerLinkAfterAPICont > [webView setUIDelegate:uiDelegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid1 = [webView _webProcessIdentifier]; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(pid1, [createdWebView _webProcessIdentifier]); >@@ -4559,7 +4559,7 @@ TEST(ProcessSwap, OpenerLinkAfterAPICont > EXPECT_WK_STREQ(@"pson://www.webkit.org/main1.html", hasOpener); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We force a proces-swap via client API. >@@ -4569,7 +4569,7 @@ TEST(ProcessSwap, OpenerLinkAfterAPICont > > // Navigating from the above URL to this URL normally should not process swap. > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main3.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -4586,7 +4586,7 @@ TEST(ProcessSwap, OpenerLinkAfterAPICont > hasOpener = [hasOpenerString isEqualToString:@"true"]; > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } while (hasOpener && (--timeout)); > EXPECT_FALSE(hasOpener); >@@ -4595,7 +4595,7 @@ TEST(ProcessSwap, OpenerLinkAfterAPICont > EXPECT_WK_STREQ(@"true", savedOpenerIsClosed); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -4615,14 +4615,14 @@ TEST(ProcessSwap, OpenerLinkAfterAPICont > [webView setUIDelegate:uiDelegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > auto pid1 = [webView _webProcessIdentifier]; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(pid1, [createdWebView _webProcessIdentifier]); >@@ -4632,7 +4632,7 @@ TEST(ProcessSwap, OpenerLinkAfterAPICont > EXPECT_WK_STREQ(@"pson://www.webkit.org/main1.html", hasOpener); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We force a proces-swap via client API. >@@ -4642,7 +4642,7 @@ TEST(ProcessSwap, OpenerLinkAfterAPICont > > // Navigating from the above URL to this URL normally should not process swap. > [createdWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main3.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [createdWebView _webProcessIdentifier]; >@@ -4653,7 +4653,7 @@ TEST(ProcessSwap, OpenerLinkAfterAPICont > EXPECT_WK_STREQ(@"false", hasOpener); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -4678,7 +4678,7 @@ static void runProcessSwapDueToRelatedWe > NSURLRequest *request = [NSURLRequest requestWithURL:relatedViewURL]; > [webView1 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView1 _webProcessIdentifier]; >@@ -4693,7 +4693,7 @@ static void runProcessSwapDueToRelatedWe > request = [NSURLRequest requestWithURL:targetURL]; > [webView2 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView2 _webProcessIdentifier]; >@@ -4740,7 +4740,7 @@ TEST(ProcessSwap, RelatedWebViewBeforeWe > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView1 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView1 _webProcessIdentifier]; >@@ -4748,7 +4748,7 @@ TEST(ProcessSwap, RelatedWebViewBeforeWe > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView2 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView2 _webProcessIdentifier]; >@@ -4789,7 +4789,7 @@ TEST(ProcessSwap, ReloadRelatedWebViewAf > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView1 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView1 _webProcessIdentifier]; >@@ -4797,7 +4797,7 @@ TEST(ProcessSwap, ReloadRelatedWebViewAf > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; > [webView2 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView2 _webProcessIdentifier]; >@@ -4809,10 +4809,10 @@ TEST(ProcessSwap, ReloadRelatedWebViewAf > > kill(pid1, 9); > >- TestWebKitAPI::Util::run(&didCrash); >+ TestWebKitAPI::runUntil(didCrash); > didCrash = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -4833,7 +4833,7 @@ TEST(ProcessSwap, TerminatedSuspendedPag > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView _webProcessIdentifier]; >@@ -4848,7 +4848,7 @@ TEST(ProcessSwap, TerminatedSuspendedPag > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]; > [webView2 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView2 _webProcessIdentifier]; >@@ -4857,7 +4857,7 @@ TEST(ProcessSwap, TerminatedSuspendedPag > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView2 _killWebContentProcessAndResetState]; >@@ -4871,7 +4871,7 @@ TEST(ProcessSwap, TerminatedSuspendedPag > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main2.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid4 = [webView _webProcessIdentifier]; >@@ -4896,13 +4896,13 @@ TEST(ProcessSwap, NavigateBackAndForth) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto* backForwardList = [webView backForwardList]; >@@ -4912,7 +4912,7 @@ TEST(ProcessSwap, NavigateBackAndForth) > EXPECT_WK_STREQ(@"pson://www.webkit.org/main.html", [backForwardList.backItem.URL absoluteString]); > > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.webkit.org/main.html", [backForwardList.currentItem.URL absoluteString]); >@@ -4921,7 +4921,7 @@ TEST(ProcessSwap, NavigateBackAndForth) > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [backForwardList.forwardItem.URL absoluteString]); > > [webView goForward]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [backForwardList.currentItem.URL absoluteString]); >@@ -4949,7 +4949,7 @@ TEST(ProcessSwap, SwapOnLoadHTMLString) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView _webProcessIdentifier]; >@@ -4957,7 +4957,7 @@ TEST(ProcessSwap, SwapOnLoadHTMLString) > NSString *htmlString = @"<html><body>substituteData</body></html>"; > [webView loadHTMLString:htmlString baseURL:[NSURL URLWithString:@"http://example.com"]]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -4969,7 +4969,7 @@ TEST(ProcessSwap, SwapOnLoadHTMLString) > EXPECT_WK_STREQ(@"substituteData", (NSString *)innerText); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -4990,52 +4990,52 @@ TEST(ProcessSwap, EphemeralWebStorage) > [webView setNavigationDelegate:delegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://webkit.org/"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [webView evaluateJavaScript:@"window.localStorage.setItem('a','b')" completionHandler:^(id, NSError *) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [webView evaluateJavaScript:@"window.sessionStorage.setItem('b,'a')" completionHandler:^(id, NSError *) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://example.com/"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://webkit.org/"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [webView evaluateJavaScript:@"window.localStorage.getItem('a')" completionHandler:^(id result, NSError *) { > EXPECT_TRUE([@"b" isEqualToString:result]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [webView loadHTMLString:@"<html><iframe src='pson://www.webkit.org/iframe.html'></iframe></html>" baseURL:[NSURL URLWithString:@"http://www.example.com/"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [webView evaluateJavaScript:@"window.localStorage.getItem('a')" completionHandler:^(id result, NSError *) { > EXPECT_FALSE([@"b" isEqualToString:result]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [webView evaluateJavaScript:@"window.sessionStorage.getItem('b')" completionHandler:^(id result, NSError *) { > EXPECT_FALSE([@"a" isEqualToString:result]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST(ProcessSwap, UsePrewarmedProcessAfterTerminatingNetworkProcess) >@@ -5056,7 +5056,7 @@ TEST(ProcessSwap, UsePrewarmedProcessAft > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > TestWebKitAPI::Util::spinRunLoop(1); >@@ -5068,7 +5068,7 @@ TEST(ProcessSwap, UsePrewarmedProcessAft > request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView2 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -5097,7 +5097,7 @@ TEST(ProcessSwap, UseSessionCookiesAfter > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"SetSessionCookie" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView _webProcessIdentifier]; >@@ -5106,7 +5106,7 @@ TEST(ProcessSwap, UseSessionCookiesAfter > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -5116,13 +5116,13 @@ TEST(ProcessSwap, UseSessionCookiesAfter > request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"GetSessionCookie" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid3 = [webView _webProcessIdentifier]; > EXPECT_NE(pid2, pid3); > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; > > EXPECT_EQ(1u, [receivedMessages count]); >@@ -5163,7 +5163,7 @@ TEST(ProcessSwap, UseSessionCookiesAfter > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"SetSessionCookie" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [webView _webProcessIdentifier]; >@@ -5172,7 +5172,7 @@ TEST(ProcessSwap, UseSessionCookiesAfter > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -5182,14 +5182,14 @@ TEST(ProcessSwap, UseSessionCookiesAfter > request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"GetSessionCookie" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid3 = [webView _webProcessIdentifier]; > EXPECT_NE(pid2, pid3); > EXPECT_NE(pid1, pid3); > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; > > EXPECT_EQ(1u, [receivedMessages count]); >@@ -5214,7 +5214,7 @@ TEST(ProcessSwap, ProcessSwapInRelatedVi > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView1 loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto applePID = [webView1 _webProcessIdentifier]; >@@ -5231,7 +5231,7 @@ TEST(ProcessSwap, ProcessSwapInRelatedVi > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView2 loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView2 _webProcessIdentifier]; >@@ -5268,7 +5268,7 @@ TEST(ProcessSwap, TerminateProcessAfterP > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto webkitPID = [webView _webProcessIdentifier]; >@@ -5276,7 +5276,7 @@ TEST(ProcessSwap, TerminateProcessAfterP > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_NE(webkitPID, [webView _webProcessIdentifier]); >@@ -5284,12 +5284,12 @@ TEST(ProcessSwap, TerminateProcessAfterP > webProcessTerminated = false; > kill([webView _webProcessIdentifier], 9); > >- TestWebKitAPI::Util::run(&webProcessTerminated); >+ TestWebKitAPI::runUntil(webProcessTerminated); > > TestWebKitAPI::Util::spinRunLoop(1); > > [webView reload]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -5312,7 +5312,7 @@ TEST(ProcessSwap, SwapWithGestureControl > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Ensure a ViewGestureController is created. >@@ -5324,7 +5324,7 @@ TEST(ProcessSwap, SwapWithGestureControl > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > } >@@ -5355,7 +5355,7 @@ TEST(ProcessSwap, CrashWithGestureContro > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Ensure a ViewGestureController is created. >@@ -5367,12 +5367,12 @@ TEST(ProcessSwap, CrashWithGestureContro > webProcessTerminated = false; > kill([webView _webProcessIdentifier], 9); > >- TestWebKitAPI::Util::run(&webProcessTerminated); >+ TestWebKitAPI::runUntil(webProcessTerminated); > > TestWebKitAPI::Util::spinRunLoop(1); > > [webView reload]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > } >@@ -5402,13 +5402,13 @@ TEST(ProcessSwap, NavigateCrossOriginWit > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ([webView _webProcessIdentifier], [createdWebView _webProcessIdentifier]); >@@ -5422,14 +5422,14 @@ TEST(ProcessSwap, NavigateCrossOriginWit > EXPECT_WK_STREQ(@"true", hasOpener); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Navigate cross-origin. > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView URL] absoluteString]); >@@ -5439,7 +5439,7 @@ TEST(ProcessSwap, NavigateCrossOriginWit > EXPECT_WK_STREQ(@"true", hasOpener); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We should not have process-swapped since an auxiliary window has an opener link to us. >@@ -5479,16 +5479,16 @@ TEST(ProcessSwap, NavigateCrossOriginWit > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Opens "pson://www.webkit.org/main2.html" in an auxiliary window. > [webView evaluateJavaScript:@"testLink.click()" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ([webView _webProcessIdentifier], [createdWebView _webProcessIdentifier]); >@@ -5500,14 +5500,14 @@ TEST(ProcessSwap, NavigateCrossOriginWit > [webView evaluateJavaScript:@"saveOpenee()" completionHandler: [&] (id, NSError *error) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView evaluateJavaScript:@"openee.location.href" completionHandler: [&] (id openeeURL, NSError *error) { > EXPECT_WK_STREQ(@"pson://www.webkit.org/main2.html", openeeURL); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // New window should have an opener. >@@ -5515,13 +5515,13 @@ TEST(ProcessSwap, NavigateCrossOriginWit > EXPECT_WK_STREQ(@"true", hasOpener); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Navigate auxiliary window cross-origin. > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [createdWebView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[createdWebView URL] absoluteString]); >@@ -5531,13 +5531,13 @@ TEST(ProcessSwap, NavigateCrossOriginWit > EXPECT_WK_STREQ(@"true", hasOpener); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > [createdWebView evaluateJavaScript:@"window.opener.closed ? 'true' : 'false'" completionHandler: [&] (id openerIsClosed, NSError *error) { > EXPECT_WK_STREQ(@"false", openerIsClosed); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // We should not have process-swapped since the auxiliary window has an opener. >@@ -5547,7 +5547,7 @@ TEST(ProcessSwap, NavigateCrossOriginWit > [createdWebView evaluateJavaScript:@"window.opener = null" completionHandler: [&] (id, NSError *error) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Auxiliary window should not have an opener. >@@ -5555,13 +5555,13 @@ TEST(ProcessSwap, NavigateCrossOriginWit > EXPECT_WK_STREQ(@"false", hasOpener); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Navigate openee cross-origin again. > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.google.com/main.html"]]; > [createdWebView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Auxiliary window should not have an opener. >@@ -5569,7 +5569,7 @@ TEST(ProcessSwap, NavigateCrossOriginWit > EXPECT_WK_STREQ(@"false", hasOpener); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.google.com/main.html", [[createdWebView URL] absoluteString]); >@@ -5580,7 +5580,7 @@ TEST(ProcessSwap, NavigateCrossOriginWit > EXPECT_WK_STREQ(@"false", openeeIsClosed); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -5608,16 +5608,16 @@ TEST(ProcessSwap, GoBackToSuspendedPageW > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; > > [webView1 loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.webkit.org/main1.html", [[webView1 URL] absoluteString]); > auto pid1 = [webView1 _webProcessIdentifier]; > >- TestWebKitAPI::Util::run(&didCreateWebView); >+ TestWebKitAPI::runUntil(didCreateWebView); > didCreateWebView = false; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // New WKWebView has now navigated to webkit.org. >@@ -5627,7 +5627,7 @@ TEST(ProcessSwap, GoBackToSuspendedPageW > > // Click link in new WKWebView so that it navigates cross-site to apple.com. > [createdWebView evaluateJavaScript:@"testLink.click()" completionHandler:nil]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // New WKWebView has now navigated to apple.com. >@@ -5637,7 +5637,7 @@ TEST(ProcessSwap, GoBackToSuspendedPageW > > // Navigate back to the suspended page (should use the page cache). > [createdWebView goBack]; >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; > > EXPECT_WK_STREQ(@"pson://www.webkit.org/main2.html", [[createdWebView URL] absoluteString]); >@@ -5647,7 +5647,7 @@ TEST(ProcessSwap, GoBackToSuspendedPageW > // Do a fragment navigation in the original WKWebView and make sure this does not crash. > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html#testLink"]]; > [webView1 loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_WK_STREQ(@"pson://www.webkit.org/main1.html#testLink", [[webView1 URL] absoluteString]); >@@ -5688,7 +5688,7 @@ static unsigned waitUntilScrollPositionI > scrollPosition = [result integerValue]; > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } while (!scrollPosition); > >@@ -5712,13 +5712,13 @@ TEST(ProcessSwap, ScrollPositionRestorat > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView evaluateJavaScript:@"scroll(0, 5000)" completionHandler: [&] (id result, NSError *error) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > do { >@@ -5727,18 +5727,18 @@ TEST(ProcessSwap, ScrollPositionRestorat > > [webView evaluateJavaScript:@"testLink.click()" completionHandler: nil]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView evaluateJavaScript:@"window.scrollY" completionHandler: [&] (id result, NSError *error) { > EXPECT_EQ(0, [result integerValue]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto scrollPosition = waitUntilScrollPositionIsRestored(webView.get()); >@@ -5747,7 +5747,7 @@ TEST(ProcessSwap, ScrollPositionRestorat > [webView evaluateJavaScript:@"scroll(0, 4000)" completionHandler: [&] (id result, NSError *error) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > do { >@@ -5756,18 +5756,18 @@ TEST(ProcessSwap, ScrollPositionRestorat > > [webView evaluateJavaScript:@"testLink.click()" completionHandler: nil]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView evaluateJavaScript:@"window.scrollY" completionHandler: [&] (id result, NSError *error) { > EXPECT_EQ(0, [result integerValue]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > scrollPosition = waitUntilScrollPositionIsRestored(webView.get()); >@@ -5798,7 +5798,7 @@ TEST(ProcessSwap, ContentBlockingAfterPr > [[WKContentRuleListStore defaultStore] removeContentRuleListForIdentifier:@"ContentBlockingAfterProcessSwapExtension" completionHandler:^(NSError *error) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto processPoolConfiguration = psonProcessPoolConfiguration(); >@@ -5817,7 +5817,7 @@ TEST(ProcessSwap, ContentBlockingAfterPr > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > auto handler = adoptNS([[PSONScheme alloc] init]); > [handler addMappingFromURLString:@"pson://www.webkit.org/main.html" toData:contentBlockingAfterProcessSwapTestBytes]; >@@ -5832,7 +5832,7 @@ TEST(ProcessSwap, ContentBlockingAfterPr > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView evaluateJavaScript:@"window.wasSubframeLoaded ? 'FAIL' : 'PASS'" completionHandler: [&] (id result, NSError *error) { >@@ -5840,12 +5840,12 @@ TEST(ProcessSwap, ContentBlockingAfterPr > EXPECT_WK_STREQ(@"PASS", blockSuccess); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView evaluateJavaScript:@"window.wasSubframeLoaded ? 'FAIL' : 'PASS'" completionHandler: [&] (id result, NSError *error) { >@@ -5853,11 +5853,11 @@ TEST(ProcessSwap, ContentBlockingAfterPr > EXPECT_WK_STREQ(@"PASS", blockSuccess); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView goBack]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView evaluateJavaScript:@"window.wasSubframeLoaded ? 'FAIL' : 'PASS'" completionHandler: [&] (id result, NSError *error) { >@@ -5865,11 +5865,11 @@ TEST(ProcessSwap, ContentBlockingAfterPr > EXPECT_WK_STREQ(@"PASS", blockSuccess); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView goForward]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView evaluateJavaScript:@"window.wasSubframeLoaded ? 'FAIL' : 'PASS'" completionHandler: [&] (id result, NSError *error) { >@@ -5877,13 +5877,13 @@ TEST(ProcessSwap, ContentBlockingAfterPr > EXPECT_WK_STREQ(@"PASS", blockSuccess); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [[WKContentRuleListStore defaultStore] removeContentRuleListForIdentifier:@"ContentBlockingAfterProcessSwapExtension" completionHandler:^(NSError *error) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -5898,7 +5898,7 @@ TEST(ProcessSwap, ContentExtensionBlocks > [[WKContentRuleListStore defaultStore] removeContentRuleListForIdentifier:@"ContentBlockingAfterProcessSwapExtension" completionHandler:^(NSError *error) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto processPoolConfiguration = psonProcessPoolConfiguration(); >@@ -5920,7 +5920,7 @@ TEST(ProcessSwap, ContentExtensionBlocks > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > auto handler = adoptNS([[PSONScheme alloc] init]); > [handler addMappingFromURLString:@"pson://www.apple.com/blockme.html" toData:notifyLoadedBytes]; >@@ -5932,23 +5932,23 @@ TEST(ProcessSwap, ContentExtensionBlocks > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > receivedMessage = false; > failed = false; > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/blockme.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&failed); >+ TestWebKitAPI::runUntil(failed); > failed = false; > EXPECT_FALSE(receivedMessage); > > [webView _loadAlternateHTMLString:@"Blocked" baseURL:[NSURL URLWithString:@"data:text/html,"] forUnreachableURL:[NSURL URLWithString:@"pson://www.apple.com/blockme.html"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView _reloadWithoutContentBlockers]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_FALSE(failed); >@@ -5958,7 +5958,7 @@ TEST(ProcessSwap, ContentExtensionBlocks > [[WKContentRuleListStore defaultStore] removeContentRuleListForIdentifier:@"ContentBlockingAfterProcessSwapExtension" completionHandler:^(NSError *error) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -6024,17 +6024,17 @@ TEST(ProcessSwap, GetUserMediaCaptureSta > auto request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/getUserMedia.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > >- TestWebKitAPI::Util::run(&isCapturing); >+ TestWebKitAPI::runUntil(isCapturing); > > auto pid1 = [webView _webProcessIdentifier]; > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.org/test.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid2 = [webView _webProcessIdentifier]; >@@ -6044,7 +6044,7 @@ TEST(ProcessSwap, GetUserMediaCaptureSta > > isCapturing = false; > [webView goBack]; >- TestWebKitAPI::Util::run(&isCapturing); >+ TestWebKitAPI::runUntil(isCapturing); > isCapturing = false; > } > >@@ -6090,7 +6090,7 @@ TEST(ProcessSwap, PageOverlayLayerPersis > auto request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/page-overlay"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView waitForNextPresentationUpdate]; >@@ -6104,7 +6104,7 @@ TEST(ProcessSwap, PageOverlayLayerPersis > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/page-overlay"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView waitForNextPresentationUpdate]; >@@ -6138,19 +6138,19 @@ TEST(ProcessSwap, QuickLookRequestsPassw > auto* request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"password-protected" withExtension:@"pages" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&didStartQuickLookLoad); >+ TestWebKitAPI::runUntil(didStartQuickLookLoad); > didStartQuickLookLoad = false; > >- TestWebKitAPI::Util::run(&requestedQuickLookPassword); >+ TestWebKitAPI::runUntil(requestedQuickLookPassword); > requestedQuickLookPassword = false; > >- TestWebKitAPI::Util::run(&didFinishQuickLookLoad); >+ TestWebKitAPI::runUntil(didFinishQuickLookLoad); > didFinishQuickLookLoad = false; > } > >@@ -6195,7 +6195,7 @@ TEST(ProcessSwap, PassMinimumDeviceWidth > auto* request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > bool finishedRunningScript = false; >@@ -6204,7 +6204,7 @@ TEST(ProcessSwap, PassMinimumDeviceWidth > EXPECT_EQ(1024, [width intValue]); > finishedRunningScript = true; > }]; >- TestWebKitAPI::Util::run(&finishedRunningScript); >+ TestWebKitAPI::runUntil(finishedRunningScript); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProvisionalURLNotChange.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ProvisionalURLNotChange.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ProvisionalURLNotChange.mm (working copy) >@@ -47,12 +47,12 @@ TEST(WKWebView, ProvisionalURLNotChange) > [webView setNavigationDelegate:navigationDelegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"data:text/html,start"]]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > NSURL *invalidURL = [NSURL URLWithString:@"https://a@/b"]; > [webView loadRequest:[NSURLRequest requestWithURL:invalidURL]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > isDone = false; > > EXPECT_STREQ([webView URL].absoluteString.UTF8String, "data:text/html,start"); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm (working copy) >@@ -80,7 +80,7 @@ TEST(WebKit, HTTPSProxy) > [webView setUIDelegate:delegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://example.com/"]]]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm (working copy) >@@ -244,7 +244,7 @@ static RetainPtr<WKWebView> runTest(Quic > [webView loadRequest:request]; > > isDone = false; >- Util::run(&isDone); >+ runUntil(isDone); > > return webView; > } >@@ -345,7 +345,7 @@ TEST(QuickLook, DownloadResponseBeforeLo > EXPECT_FALSE([delegate didStartQuickLookLoad]); > EXPECT_TRUE([delegate didFailNavigation]); > >- Util::run(&downloadIsDone); >+ runUntil(downloadIsDone); > [delegate verifyDownload]; > } > >@@ -408,7 +408,7 @@ TEST(QuickLook, ReloadAndSameDocumentNav > > isDone = false; > [webView evaluateJavaScript:@"window.location.reload()" completionHandler:nil]; >- Util::run(&isDone); >+ runUntil(isDone); > EXPECT_FALSE([delegate didFailNavigation]); > EXPECT_TRUE([delegate didFinishNavigation]); > EXPECT_TRUE([delegate didFinishQuickLookLoad]); >@@ -420,7 +420,7 @@ TEST(QuickLook, ReloadAndSameDocumentNav > EXPECT_WK_STREQ(@"#test", value); > isDone = true; > }]; >- Util::run(&isDone); >+ runUntil(isDone); > } > > @interface QuickLookFrameLoadDelegate : NSObject <WebFrameLoadDelegate> >@@ -452,7 +452,7 @@ TEST(QuickLook, LegacyQuickLookContent) > WebFrame *mainFrame = [webView mainFrame]; > > [mainFrame loadRequest:[NSURLRequest requestWithURL:pagesDocumentURL]]; >- Util::run(&isDone); >+ runUntil(isDone); > WebThreadLock(); > > NSUInteger expectedFileSize; >@@ -472,7 +472,7 @@ TEST(QuickLook, LegacyQuickLookContent) > > isDone = false; > [mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; >- Util::run(&isDone); >+ runUntil(isDone); > WebThreadLock(); > > EXPECT_NULL(mainFrame.dataSource._quickLookContent); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.mm (working copy) >@@ -57,7 +57,7 @@ id <RemoteObjectProtocol> object > EXPECT_WK_STREQ(result, @"Hello, World!"); > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > isDone = false; > [object sayHello:@"Hello Again!" completionHandler:^(NSString *result) { >@@ -65,14 +65,14 @@ id <RemoteObjectProtocol> object > EXPECT_WK_STREQ(result, @"Your string was 'Hello Again!'"); > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > isDone = false; > [object selectionAndClickInformationForClickAtPoint:[NSValue valueWithPoint:NSMakePoint(12, 34)] completionHandler:^(NSDictionary *result) { > EXPECT_TRUE([result isEqual:@{ @"URL": [NSURL URLWithString:@"http://www.webkit.org/"] }]); > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > isDone = false; > [object takeRange:NSMakeRange(345, 123) completionHandler:^(NSUInteger location, NSUInteger length) { >@@ -80,7 +80,7 @@ id <RemoteObjectProtocol> object > EXPECT_EQ(123U, length); > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > isDone = false; > [object takeSize:CGSizeMake(123.45, 678.91) completionHandler:^(CGFloat width, CGFloat height) { >@@ -88,7 +88,7 @@ id <RemoteObjectProtocol> object > EXPECT_EQ(678.91, height); > isDone = true; > }]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > isDone = false; > >@@ -103,6 +103,6 @@ id <RemoteObjectProtocol> object > }]; > } > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/RenderedImageWithOptions.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/RenderedImageWithOptions.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/RenderedImageWithOptions.mm (working copy) >@@ -60,7 +60,7 @@ auto remoteObject = retainPtr([[webV > testFinished = true; > }]; > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > TEST(WebKit, NodeHandleRenderedImageExcludingOverflow) >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/RenderingProgress.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/RenderingProgress.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/RenderingProgress.mm (working copy) >@@ -69,5 +69,5 @@ [[webView _remoteObjectRegistry] reg > > [webView loadHTMLString:@"<body style='background-color: red;'></body>" baseURL:nil]; > >- TestWebKitAPI::Util::run(&didObserveFirstMeaningfulPaint); >+ TestWebKitAPI::runUntil(didObserveFirstMeaningfulPaint); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm (working copy) >@@ -59,7 +59,7 @@ TEST(WebKit, ReparentWebViewTimeout) > }); > }); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > }; > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm (working copy) >@@ -51,7 +51,7 @@ - (NSArray<_WKTextInputContext *> *)sync > result = contexts; > finished = true; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > return result.autorelease(); > } > >@@ -63,7 +63,7 @@ - (BOOL)synchronouslyFocusTextInputConte > success = innerSuccess; > finished = true; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > return success; > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/RequiresUserActionForPlayback.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/RequiresUserActionForPlayback.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/RequiresUserActionForPlayback.mm (working copy) >@@ -83,7 +83,7 @@ public: > [webView loadFileURL:fileURL allowingReadAccessToURL:fileURL]; > [webView _test_waitForDidFinishNavigation]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > } > >@@ -93,7 +93,7 @@ public: > [webView loadFileURL:fileURL allowingReadAccessToURL:fileURL]; > [webView _test_waitForDidFinishNavigation]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > } > >@@ -103,7 +103,7 @@ public: > [webView loadFileURL:fileURL allowingReadAccessToURL:fileURL]; > [webView _test_waitForDidFinishNavigation]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm (working copy) >@@ -76,7 +76,7 @@ TEST(ResourceLoadStatistics, Grandfather > [dataStore _setResourceLoadStatisticsEnabled:YES]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; > >- TestWebKitAPI::Util::run(&grandfatheredFlag); >+ TestWebKitAPI::runUntil(grandfatheredFlag); > > // Spin the runloop until the resource load statistics file has written to disk. > // If the test enters a spin loop here, it has failed. >@@ -91,7 +91,7 @@ TEST(ResourceLoadStatistics, Grandfather > doneFlag = true; > }]; > >- TestWebKitAPI::Util::run(&doneFlag); >+ TestWebKitAPI::runUntil(doneFlag); > TestWebKitAPI::Util::spinRunLoop(10); > > // The website data store remove should have completed, but since we removed all of the data types that are monitored by resource load statistics, >@@ -106,8 +106,8 @@ TEST(ResourceLoadStatistics, Grandfather > > // Since we did not remove every data type covered by resource load statistics, we do expect that grandfathering took place again. > // If the test hangs waiting on either of these conditions, it has failed. >- TestWebKitAPI::Util::run(&grandfatheredFlag); >- TestWebKitAPI::Util::run(&doneFlag); >+ TestWebKitAPI::runUntil(grandfatheredFlag); >+ TestWebKitAPI::runUntil(doneFlag); > > // Spin the runloop until the resource load statistics file has written to disk. > // If the test enters a spin loop here, it has failed. >@@ -142,7 +142,7 @@ TEST(ResourceLoadStatistics, ShouldNotGr > [dataStore _setResourceLoadStatisticsEnabled:YES]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; > >- TestWebKitAPI::Util::run(&callbackFlag); >+ TestWebKitAPI::runUntil(callbackFlag); > } > > TEST(ResourceLoadStatistics, ChildProcessesNotLaunched) >@@ -174,7 +174,7 @@ TEST(ResourceLoadStatistics, ChildProces > [dataStore _setResourceLoadStatisticsEnabled:YES]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; > >- TestWebKitAPI::Util::run(&doneFlag); >+ TestWebKitAPI::runUntil(doneFlag); > > EXPECT_TRUE([[NSFileManager defaultManager] fileExistsAtPath:targetURL.path]); > >@@ -202,5 +202,5 @@ TEST(ResourceLoadStatistics, IPCAfterSto > > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"notify-resourceLoadObserver" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm (working copy) >@@ -66,7 +66,7 @@ TEST(WebKit, ResponsivenessTimerShouldNo > [webView1 setNavigationDelegate:delegate.get()]; > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView1 loadRequest:request]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_FALSE(didBecomeUnresponsive); > >@@ -75,7 +75,7 @@ TEST(WebKit, ResponsivenessTimerShouldNo > > didFinishLoad = false; > [webView2 loadRequest:request]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_FALSE(didBecomeUnresponsive); > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm (working copy) >@@ -84,7 +84,7 @@ TEST(WebKit, ResponsivenessTimerDoesntFi > [webView setNavigationDelegate:delegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > WKContextPostMessageToInjectedBundle(context.get(), Util::toWK("BrieflyPause").get(), 0); > >@@ -93,7 +93,7 @@ TEST(WebKit, ResponsivenessTimerDoesntFi > // (but not so long that the responsiveness timer fires). > [webView typeCharacter:' ']; > >- Util::run(&didBrieflyPause); >+ runUntil(didBrieflyPause); > > EXPECT_FALSE(didBecomeUnresponsive); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm (working copy) >@@ -73,7 +73,7 @@ static WKRetainPtr<WKDataRef> createSess > auto view = adoptNS([WKWebView new]); > [view setNavigationDelegate:delegate.get()]; > [view loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > NSData *data = [view _sessionStateData]; >@@ -89,7 +89,7 @@ TEST(WebKit, RestoreSessionStateWithoutN > auto sessionState = adoptWK(WKSessionStateCreateFromData(data.get())); > WKPageRestoreFromSessionStateWithoutNavigation([webView _pageForTesting], sessionState.get()); > >- Util::run(&didChangeBackForwardList); >+ runUntil(didChangeBackForwardList); > > WKRetainPtr<WKURLRef> committedURL = adoptWK(WKPageCopyCommittedURL([webView _pageForTesting])); > EXPECT_NULL(committedURL.get()); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm (working copy) >@@ -69,7 +69,7 @@ TEST(WebKit, RunOpenPanelNonLatin1) > NSInteger windowNumber = [webView window].windowNumber; > [webView mouseDown:[NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:clickPoint modifierFlags:0 timestamp:0 windowNumber:windowNumber context:nil eventNumber:0 clickCount:1 pressure:1]]; > [webView mouseUp:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:clickPoint modifierFlags:0 timestamp:0 windowNumber:windowNumber context:nil eventNumber:0 clickCount:1 pressure:1]]; >- Util::run(&fileSelected); >+ runUntil(fileSelected); > > __block bool testFinished = false; > [webView evaluateJavaScript:@"document.getElementsByTagName('input')[0].files[0].name" completionHandler:^(id _Nullable result, NSError * _Nullable error) { >@@ -77,7 +77,7 @@ TEST(WebKit, RunOpenPanelNonLatin1) > EXPECT_WK_STREQ(expectedFileName, result); > testFinished = true; > }]; >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm (working copy) >@@ -179,7 +179,7 @@ TEST(SafeBrowsing, Preference) > TestWebKitAPI::Util::spinRunLoop(); > [webView configuration].preferences._safeBrowsingEnabled = NO; > [webView loadRequest:[NSURLRequest requestWithURL:resourceURL(@"simple2")]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > EXPECT_FALSE([webView configuration].preferences._safeBrowsingEnabled); > EXPECT_FALSE([webView _safeBrowsingWarning]); > } >@@ -256,7 +256,7 @@ TEST(SafeBrowsing, VisitUnsafeWebsite) > EXPECT_EQ(warning.subviews.count, 2ull); > EXPECT_FALSE(committedNavigation); > visitUnsafeSite(warning); >- TestWebKitAPI::Util::run(&committedNavigation); >+ TestWebKitAPI::runUntil(committedNavigation); > } > > TEST(SafeBrowsing, NavigationClearsWarning) >@@ -286,12 +286,12 @@ TEST(SafeBrowsing, ShowWarningSPI) > > showWarning(); > checkTitleAndClick([webView _safeBrowsingWarning].subviews.firstObject.subviews[3], "Go Back"); >- TestWebKitAPI::Util::run(&completionHandlerCalled); >+ TestWebKitAPI::runUntil(completionHandlerCalled); > EXPECT_FALSE(shouldContinueValue); > > showWarning(); > [[webView _safeBrowsingWarning] performSelector:NSSelectorFromString(@"clickedOnLink:") withObject:[WKWebView _visitUnsafeWebsiteSentinel]]; >- TestWebKitAPI::Util::run(&completionHandlerCalled); >+ TestWebKitAPI::runUntil(completionHandlerCalled); > EXPECT_TRUE(shouldContinueValue); > } > >@@ -418,18 +418,18 @@ TEST(SafeBrowsing, WKWebViewGoBack) > [webView configuration].preferences._safeBrowsingEnabled = YES; > [webView setNavigationDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:resourceURL(@"simple")]]; >- TestWebKitAPI::Util::run(&navigationFinished); >+ TestWebKitAPI::runUntil(navigationFinished); > > navigationFinished = false; > [webView loadRequest:[NSURLRequest requestWithURL:resourceURL(@"simple2")]]; >- TestWebKitAPI::Util::run(&navigationFinished); >+ TestWebKitAPI::runUntil(navigationFinished); > > navigationFinished = false; > [webView loadRequest:[NSURLRequest requestWithURL:resourceURL(@"simple3")]]; > while (![webView _safeBrowsingWarning]) > TestWebKitAPI::Util::spinRunLoop(); > [webView goBack]; >- TestWebKitAPI::Util::run(&navigationFinished); >+ TestWebKitAPI::runUntil(navigationFinished); > EXPECT_TRUE([[webView URL] isEqual:resourceURL(@"simple2")]); > } > >@@ -443,7 +443,7 @@ TEST(SafeBrowsing, WKWebViewGoBackIFrame > [webView configuration].preferences._safeBrowsingEnabled = YES; > [webView setNavigationDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:resourceURL(@"simple2")]]; >- TestWebKitAPI::Util::run(&navigationFinished); >+ TestWebKitAPI::runUntil(navigationFinished); > > [webView loadRequest:[NSURLRequest requestWithURL:resourceURL(@"simple-iframe")]]; > while (![webView _safeBrowsingWarning]) >@@ -453,7 +453,7 @@ TEST(SafeBrowsing, WKWebViewGoBackIFrame > #endif > navigationFinished = false; > goBack([webView _safeBrowsingWarning], false); >- TestWebKitAPI::Util::run(&navigationFinished); >+ TestWebKitAPI::runUntil(navigationFinished); > EXPECT_TRUE([[webView URL] isEqual:resourceURL(@"simple2")]); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm (working copy) >@@ -171,7 +171,7 @@ TEST(WebKit, WKContextRegisterURLSchemeA > PlatformWebView webView { context.get() }; > webView.platformView().browsingContextController.loadDelegate = [[WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequestLoadDelegate alloc] init]; > [webView.platformView().browsingContextController loadHTMLString:@"<!DOCTYPE html><body><script src='echo://A/A_1'></script>" baseURL:[NSURL URLWithString:@"echo://A"]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > EXPECT_WK_STREQ(@"echo://A/A_1", [lastEchoedURL absoluteString]); >@@ -194,7 +194,7 @@ TEST(WebKit, WKContextRegisterURLSchemeA > PlatformWebView webView { context.get() }; > webView.platformView().browsingContextController.loadDelegate = [[WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequestLoadDelegate alloc] init]; > [webView.platformView().browsingContextController loadHTMLString:@"<!DOCTYPE html><body><script src='echo://A/A_1'></script>" baseURL:[NSURL URLWithString:@"echo://B"]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > EXPECT_NULL(lastEchoedURL); // Script blocked >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm (working copy) >@@ -480,7 +480,7 @@ TEST(ServiceWorkers, Basic) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -499,7 +499,7 @@ TEST(ServiceWorkers, Basic) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > webView = nullptr; >@@ -511,7 +511,7 @@ TEST(ServiceWorkers, Basic) > done = true; > }]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -580,7 +580,7 @@ TEST(ServiceWorkers, UserAgentOverride) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -603,7 +603,7 @@ TEST(ServiceWorkers, UserAgentOverride) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Restore from disk. >@@ -633,7 +633,7 @@ TEST(ServiceWorkers, UserAgentOverride) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -649,7 +649,7 @@ TEST(ServiceWorkers, RestoreFromDisk) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -668,7 +668,7 @@ TEST(ServiceWorkers, RestoreFromDisk) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > webView = nullptr; > configuration = nullptr; >@@ -692,7 +692,7 @@ TEST(ServiceWorkers, RestoreFromDisk) > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -706,7 +706,7 @@ TEST(ServiceWorkers, CacheStorageRestore > done = true; > }]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [WKWebsiteDataStore _deleteDefaultDataStoreForTesting]; >@@ -729,7 +729,7 @@ TEST(ServiceWorkers, CacheStorageRestore > auto *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > webView = nullptr; >@@ -748,7 +748,7 @@ TEST(ServiceWorkers, CacheStorageRestore > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -764,7 +764,7 @@ TEST(ServiceWorkers, FetchAfterRestoreFr > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -784,7 +784,7 @@ TEST(ServiceWorkers, FetchAfterRestoreFr > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > webView = nullptr; > configuration = nullptr; >@@ -809,7 +809,7 @@ TEST(ServiceWorkers, FetchAfterRestoreFr > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -824,7 +824,7 @@ TEST(ServiceWorkers, InterceptFirstLoadA > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -844,7 +844,7 @@ TEST(ServiceWorkers, InterceptFirstLoadA > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > webView = nullptr; > configuration = nullptr; >@@ -869,7 +869,7 @@ TEST(ServiceWorkers, InterceptFirstLoadA > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -881,7 +881,7 @@ TEST(ServiceWorkers, WaitForPolicyDelega > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -902,7 +902,7 @@ TEST(ServiceWorkers, WaitForPolicyDelega > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > webView = nullptr; > configuration = nullptr; >@@ -928,7 +928,7 @@ TEST(ServiceWorkers, WaitForPolicyDelega > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); >@@ -944,7 +944,7 @@ TEST(ServiceWorkers, WaitForPolicyDelega > // Verify service worker load goes well when policy delegate is ok. > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&navigationComplete); >+ TestWebKitAPI::runUntil(navigationComplete); > > EXPECT_FALSE(navigationFailed); > >@@ -960,7 +960,7 @@ TEST(ServiceWorkers, WaitForPolicyDelega > // Verify service worker load fails well when policy delegate is not ok. > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&navigationComplete); >+ TestWebKitAPI::runUntil(navigationComplete); > > EXPECT_TRUE(navigationFailed); > } >@@ -1016,7 +1016,7 @@ TEST(ServiceWorkers, SWProcessConnection > [[configuration websiteDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [[configuration websiteDataStore] fetchDataRecordsOfTypes:[NSSet setWithObject:WKWebsiteDataTypeServiceWorkerRegistrations] completionHandler:^(NSArray<WKWebsiteDataRecord *> *websiteDataRecords) { >@@ -1024,7 +1024,7 @@ TEST(ServiceWorkers, SWProcessConnection > > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<SWMessageHandler> messageHandler = adoptNS([[SWMessageHandler alloc] init]); >@@ -1047,14 +1047,14 @@ TEST(ServiceWorkers, SWProcessConnection > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/regularPageWithoutConnection.html"]]; > > [regularPageWebView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Test that a sw scheme page can register a service worker. > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > webView = nullptr; > >@@ -1062,12 +1062,12 @@ TEST(ServiceWorkers, SWProcessConnection > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/regularPageWithConnection.html"]]; > > [regularPageWebView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > regularPageWebView = nullptr; > > [newRegularPageWebView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > newRegularPageWebView = nullptr; > >@@ -1078,13 +1078,13 @@ TEST(ServiceWorkers, SWProcessConnection > done = true; > }]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [[configuration websiteDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > static const char* mainBytesWithScope = R"SWRESOURCE( >@@ -1125,14 +1125,14 @@ TEST(ServiceWorkers, ServiceWorkerProces > [[configuration websiteDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [[configuration websiteDataStore] fetchDataRecordsOfTypes:[NSSet setWithObject:WKWebsiteDataTypeServiceWorkerRegistrations] completionHandler:^(NSArray<WKWebsiteDataRecord *> *websiteDataRecords) { > > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<SWMessageHandler> messageHandler = adoptNS([[SWMessageHandler alloc] init]); >@@ -1154,7 +1154,7 @@ TEST(ServiceWorkers, ServiceWorkerProces > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/mainWithScope.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > webView = nullptr; > >@@ -1171,7 +1171,7 @@ TEST(ServiceWorkers, ServiceWorkerProces > EXPECT_EQ(1u, webView.get().configuration.processPool._webProcessCountIgnoringPrewarmed); > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/regularPageWithConnection.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Make sure that loading the simple page did not start the service worker process. >@@ -1181,7 +1181,7 @@ TEST(ServiceWorkers, ServiceWorkerProces > EXPECT_EQ(2u, webView.get().configuration.processPool._webProcessCountIgnoringPrewarmed); > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Make sure that loading this page did start the service worker process. >@@ -1190,7 +1190,7 @@ TEST(ServiceWorkers, ServiceWorkerProces > [[configuration websiteDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1206,14 +1206,14 @@ TEST(ServiceWorkers, HasServiceWorkerReg > [[configuration websiteDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [[configuration websiteDataStore] fetchDataRecordsOfTypes:[NSSet setWithObject:WKWebsiteDataTypeServiceWorkerRegistrations] completionHandler:^(NSArray<WKWebsiteDataRecord *> *websiteDataRecords) { > > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<SWMessageHandler> messageHandler = adoptNS([[SWMessageHandler alloc] init]); >@@ -1235,7 +1235,7 @@ TEST(ServiceWorkers, HasServiceWorkerReg > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/mainWithScope.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > webView = nullptr; > >@@ -1253,7 +1253,7 @@ TEST(ServiceWorkers, HasServiceWorkerReg > webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:newConfiguration.get()]); > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/regularPageWithoutConnection.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Let's use the web site data store that has service worker and load a page. >@@ -1263,7 +1263,7 @@ TEST(ServiceWorkers, HasServiceWorkerReg > EXPECT_EQ(2u, webView.get().configuration.processPool._webProcessCountIgnoringPrewarmed); > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/regularPageWithConnection.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Make sure that loading the simple page did not start the service worker process. >@@ -1272,7 +1272,7 @@ TEST(ServiceWorkers, HasServiceWorkerReg > [[configuration websiteDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1341,13 +1341,13 @@ TEST(ServiceWorkers, CacheStorageInPriva > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > auto *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/writeCache.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/readCache.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1398,7 +1398,7 @@ TEST(ServiceWorkers, ServiceWorkerAndCac > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > while (![[configuration websiteDataStore] _hasRegisteredServiceWorker]) > TestWebKitAPI::Util::spinRunLoop(0.1); >@@ -1408,14 +1408,14 @@ TEST(ServiceWorkers, ServiceWorkerAndCac > > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/regularPageGrabbingCacheStorageDirectory.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > EXPECT_TRUE(retrievedString.contains("/Caches/TestWebKitAPI/WebKit/CacheStorage")); > > [[configuration websiteDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1448,7 +1448,7 @@ TEST(ServiceWorkers, ServiceWorkerAndCac > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > while (![websiteDataStore _hasRegisteredServiceWorker]) > TestWebKitAPI::Util::spinRunLoop(0.1); >@@ -1457,14 +1457,14 @@ TEST(ServiceWorkers, ServiceWorkerAndCac > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/regularPageGrabbingCacheStorageDirectory.html"]]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > EXPECT_TRUE(retrievedString.contains("\"path\": \"/var/tmp\"")); > > [[configuration websiteDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1503,7 +1503,7 @@ TEST(ServiceWorkers, NonDefaultSessionID > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView _close]; >@@ -1518,7 +1518,7 @@ TEST(ServiceWorkers, NonDefaultSessionID > done = true; > }]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1542,7 +1542,7 @@ TEST(ServiceWorkers, ProcessPerSite) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -1575,7 +1575,7 @@ TEST(ServiceWorkers, ProcessPerSite) > NSURLRequest *request1 = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw1://host/main.html"]]; > [webView1 loadRequest:request1]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(1U, processPool._serviceWorkerProcessCount); >@@ -1583,7 +1583,7 @@ TEST(ServiceWorkers, ProcessPerSite) > RetainPtr<WKWebView> webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > [webView2 loadRequest:request1]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(1U, processPool._serviceWorkerProcessCount); >@@ -1592,7 +1592,7 @@ TEST(ServiceWorkers, ProcessPerSite) > NSURLRequest *request2 = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw2://host/main.html"]]; > [webView3 loadRequest:request2]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(1U, processPool._serviceWorkerProcessCount); >@@ -1601,7 +1601,7 @@ TEST(ServiceWorkers, ProcessPerSite) > NSURLRequest *request3 = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw1://host2/main.html"]]; > [webView4 loadRequest:request3]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_EQ(2U, processPool._serviceWorkerProcessCount); >@@ -1633,7 +1633,7 @@ TEST(ServiceWorkers, ThrottleCrash) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto messageHandler = adoptNS([[SWMessageHandler alloc] init]); >@@ -1670,7 +1670,7 @@ TEST(ServiceWorkers, ThrottleCrash) > [webView1 loadRequest:request1]; > > didFinishNavigation = false; >- TestWebKitAPI::Util::run(&didFinishNavigation); >+ TestWebKitAPI::runUntil(didFinishNavigation); > > auto webView2Configuration = adoptNS([[WKWebViewConfiguration alloc] init]); > #if PLATFORM(MAC) >@@ -1687,7 +1687,7 @@ TEST(ServiceWorkers, ThrottleCrash) > [webView2 loadRequest:request1]; > > didFinishNavigation = false; >- TestWebKitAPI::Util::run(&didFinishNavigation); >+ TestWebKitAPI::runUntil(didFinishNavigation); > } > > TEST(ServiceWorkers, LoadData) >@@ -1701,7 +1701,7 @@ TEST(ServiceWorkers, LoadData) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -1727,14 +1727,14 @@ TEST(ServiceWorkers, LoadData) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > // Now try a data load. > NSData *data = [NSData dataWithBytes:mainBytes length:strlen(mainBytes)]; > [webView loadData:data MIMEType:@"text/html" characterEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:@"sw://host/main.html"]]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > >@@ -1777,7 +1777,7 @@ TEST(ServiceWorkers, RestoreFromDiskNonD > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > [webView.get().configuration.processPool _terminateServiceWorkerProcesses]; >@@ -1804,7 +1804,7 @@ TEST(ServiceWorkers, RestoreFromDiskNonD > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > } > } >@@ -1817,7 +1817,7 @@ TEST(ServiceWorkers, SuspendNetworkProce > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -1843,7 +1843,7 @@ TEST(ServiceWorkers, SuspendNetworkProce > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"sw://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto store = [configuration websiteDataStore]; >@@ -1861,7 +1861,7 @@ TEST(ServiceWorkers, SuspendNetworkProce > [ webView.get().configuration.processPool _sendNetworkProcessDidResume]; > > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > EXPECT_TRUE([[NSFileManager defaultManager] fileExistsAtPath:swDBPath.path]); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm (working copy) >@@ -59,15 +59,15 @@ TEST(WebKit, ShouldGoToBackForwardListIt > [webView setNavigationDelegate:delegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&finished); >+ runUntil(finished); > > finished = false; > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple-iframe" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&finished); >+ runUntil(finished); > > finished = false; > [webView goBack]; >- Util::run(&finished); >+ runUntil(finished); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ShouldOpenExternalURLsInNewWindowActions.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ShouldOpenExternalURLsInNewWindowActions.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ShouldOpenExternalURLsInNewWindowActions.mm (working copy) >@@ -82,14 +82,14 @@ TEST(WebKit, ShouldOpenExternalURLsInWin > [webView setUIDelegate:controller.get()]; > > [webView loadHTMLString:@"<body onclick=\"window.open('https://webkit.org/destination')\">" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > NSPoint clickPoint = NSMakePoint(100, 100); > > [[webView hitTest:clickPoint] mouseDown:[NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; > [[webView hitTest:clickPoint] mouseUp:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; >- TestWebKitAPI::Util::run(&createdWebView); >+ TestWebKitAPI::runUntil(createdWebView); > createdWebView = false; > > // User-initiated window.open to the same host should allow external schemes but not App Links. >@@ -98,7 +98,7 @@ TEST(WebKit, ShouldOpenExternalURLsInWin > > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > decidedPolicy = false; > > // User-initiated window.open to the same host should allow external schemes but not App Links. >@@ -106,12 +106,12 @@ TEST(WebKit, ShouldOpenExternalURLsInWin > ASSERT_FALSE([action _shouldOpenAppLinks]); > > [webView loadHTMLString:@"<body onclick=\"window.open('http://apple.com/destination')\">" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > [[webView hitTest:clickPoint] mouseDown:[NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; > [[webView hitTest:clickPoint] mouseUp:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; >- TestWebKitAPI::Util::run(&createdWebView); >+ TestWebKitAPI::runUntil(createdWebView); > createdWebView = false; > > // User-initiated window.open to different host should allow external schemes and App Links. >@@ -120,7 +120,7 @@ TEST(WebKit, ShouldOpenExternalURLsInWin > > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > decidedPolicy = false; > > // User-initiated window.open to different host should allow external schemes and App Links. >@@ -143,7 +143,7 @@ TEST(WebKit, ShouldOpenExternalURLsInTar > [webView setUIDelegate:controller.get()]; > > [webView loadHTMLString:@"<a style=\"display: block; height: 100%\" href=\"https://webkit.org/destination.html\" target=\"_blank\">" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > NSPoint clickPoint = NSMakePoint(100, 100); >@@ -151,14 +151,14 @@ TEST(WebKit, ShouldOpenExternalURLsInTar > decidedPolicy = false; > [[webView hitTest:clickPoint] mouseDown:[NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; > [[webView hitTest:clickPoint] mouseUp:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > decidedPolicy = false; > > // User-initiated targeted navigation to the same host should allow external schemes but not App Links. > ASSERT_TRUE([action _shouldOpenExternalSchemes]); > ASSERT_FALSE([action _shouldOpenAppLinks]); > >- TestWebKitAPI::Util::run(&createdWebView); >+ TestWebKitAPI::runUntil(createdWebView); > createdWebView = false; > > // User-initiated targeted navigation to the same host should allow external schemes but not App Links. >@@ -167,7 +167,7 @@ TEST(WebKit, ShouldOpenExternalURLsInTar > > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > decidedPolicy = false; > > // User-initiated targeted navigation to the same host should allow external schemes but not App Links. >@@ -175,20 +175,20 @@ TEST(WebKit, ShouldOpenExternalURLsInTar > ASSERT_FALSE([action _shouldOpenAppLinks]); > > [webView loadHTMLString:@"<a style=\"display: block; height: 100%\" href=\"http://apple.com/destination.html\" target=\"_blank\">" baseURL:[NSURL URLWithString:@"http://webkit.org"]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > decidedPolicy = false; > [[webView hitTest:clickPoint] mouseDown:[NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; > [[webView hitTest:clickPoint] mouseUp:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > decidedPolicy = false; > > // User-initiated targeted navigation to different host should allow external schemes and App Links. > ASSERT_TRUE([action _shouldOpenExternalSchemes]); > ASSERT_TRUE([action _shouldOpenAppLinks]); > >- TestWebKitAPI::Util::run(&createdWebView); >+ TestWebKitAPI::runUntil(createdWebView); > createdWebView = false; > > // User-initiated targeted navigation to different host should allow external schemes and App Links. >@@ -197,7 +197,7 @@ TEST(WebKit, ShouldOpenExternalURLsInTar > > decidedPolicy = false; > [newWebView setNavigationDelegate:controller.get()]; >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > decidedPolicy = false; > > // User-initiated targeted navigation to different host should allow external schemes and App Links. >@@ -220,13 +220,13 @@ TEST(WebKit, RestoreShouldOpenExternalUR > finishedNavigation = false; > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"should-open-external-schemes" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > // Before crash > decidedPolicy = false; > [webView evaluateJavaScript:@"navigateToTelURLInNestedZeroTimer()" completionHandler:nil]; // Non-user initiated navigation because it is performed in a nested timer callback. >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > decidedPolicy = false; > > ASSERT_TRUE([action _shouldOpenExternalSchemes]); >@@ -237,13 +237,13 @@ TEST(WebKit, RestoreShouldOpenExternalUR > [webView reload]; > > finishedNavigation = false; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > // After crash > decidedPolicy = false; > [webView evaluateJavaScript:@"navigateToTelURLInNestedZeroTimer()" completionHandler:nil]; // Non-user initiated navigation because it is performed in a nested timer callback. >- TestWebKitAPI::Util::run(&decidedPolicy); >+ TestWebKitAPI::runUntil(decidedPolicy); > decidedPolicy = false; > > ASSERT_TRUE([action _shouldOpenExternalSchemes]); >@@ -320,7 +320,7 @@ TEST(WebKit, IFrameWithSameOriginAsMainF > [[webView hitTest:clickPoint] mouseDown:[NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[webView.get().window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; > [[webView hitTest:clickPoint] mouseUp:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:clickPoint modifierFlags:0 timestamp:0 windowNumber:[webView.get().window windowNumber] context:nil eventNumber:0 clickCount:1 pressure:1]]; > >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > > ASSERT_TRUE(openAppLinks); > ASSERT_TRUE(externalSchemes); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm (working copy) >@@ -47,7 +47,7 @@ TEST(WebKit, ShrinkToFit) > shrinkToFitDone = true; > }]; > >- TestWebKitAPI::Util::run(&shrinkToFitDone); >+ TestWebKitAPI::runUntil(shrinkToFitDone); > > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"lots-of-text" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; >@@ -59,7 +59,7 @@ TEST(WebKit, ShrinkToFit) > shrinkToFitAfterNavigationDone = true; > }]; > >- TestWebKitAPI::Util::run(&shrinkToFitAfterNavigationDone); >+ TestWebKitAPI::runUntil(shrinkToFitAfterNavigationDone); > > [webView _setLayoutMode:_WKLayoutModeViewSize]; > [webView evaluateJavaScript:@"document.body.clientWidth" completionHandler:^(id result, NSError *error) { >@@ -67,7 +67,7 @@ TEST(WebKit, ShrinkToFit) > shrinkToFitDisabledDone = true; > }]; > >- TestWebKitAPI::Util::run(&shrinkToFitDisabledDone); >+ TestWebKitAPI::runUntil(shrinkToFitDisabledDone); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/SnapshotStore.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/SnapshotStore.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/SnapshotStore.mm (working copy) >@@ -76,7 +76,7 @@ - (void)synchronouslyForceRepaint > { > didForceRepaint = false; > WKPageForceRepaint([self _pageForTesting], 0, forceRepaintCallback); >- TestWebKitAPI::Util::run(&didForceRepaint); >+ TestWebKitAPI::runUntil(didForceRepaint); > } > > - (void)synchronouslyLoadTestPageAndForceRepaint:(NSString *)testPageName >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm (working copy) >@@ -46,12 +46,12 @@ TEST(WKWebView, StopAllMediaPlayback) > __block bool didBeginPlaying = false; > [webView performAfterReceivingMessage:@"playing" action:^{ didBeginPlaying = true; }]; > [webView evaluateJavaScript:@"document.querySelector('video').play()" completionHandler:nil]; >- TestWebKitAPI::Util::run(&didBeginPlaying); >+ TestWebKitAPI::runUntil(didBeginPlaying); > > __block bool didPause = false; > [webView performAfterReceivingMessage:@"pause" action:^{ didPause = true; }]; > [webView _stopAllMediaPlayback]; >- TestWebKitAPI::Util::run(&didPause); >+ TestWebKitAPI::runUntil(didPause); > } > > TEST(WKWebView, SuspendResumeAllMediaPlayback) >@@ -66,12 +66,12 @@ TEST(WKWebView, SuspendResumeAllMediaPla > __block bool didBeginPlaying = false; > [webView performAfterReceivingMessage:@"playing" action:^{ didBeginPlaying = true; }]; > [webView evaluateJavaScript:@"document.querySelector('video').play()" completionHandler:nil]; >- TestWebKitAPI::Util::run(&didBeginPlaying); >+ TestWebKitAPI::runUntil(didBeginPlaying); > > __block bool didPause = false; > [webView performAfterReceivingMessage:@"pause" action:^{ didPause = true; }]; > [webView _suspendAllMediaPlayback]; >- TestWebKitAPI::Util::run(&didPause); >+ TestWebKitAPI::runUntil(didPause); > > __block bool didReject = false; > [webView performAfterReceivingMessage:@"rejected" action:^{ didReject = true; }]; >@@ -80,7 +80,7 @@ TEST(WKWebView, SuspendResumeAllMediaPla > didBeginPlaying = false; > [webView performAfterReceivingMessage:@"playing" action:^{ didBeginPlaying = true; }]; > [webView _resumeAllMediaPlayback]; >- TestWebKitAPI::Util::run(&didBeginPlaying); >+ TestWebKitAPI::runUntil(didBeginPlaying); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm (working copy) >@@ -199,7 +199,7 @@ TEST(WebKit, QuotaDelegate) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); > >@@ -225,7 +225,7 @@ TEST(WebKit, QuotaDelegate) > > receivedQuotaDelegateCalled = false; > [webView1 loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"qt1://test1.html"]]]; >- Util::run(&receivedQuotaDelegateCalled); >+ runUntil(receivedQuotaDelegateCalled); > > auto webView2 = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get() addToWindow:YES]); > auto delegate2 = adoptNS([[QuotaDelegate alloc] init]); >@@ -235,14 +235,14 @@ TEST(WebKit, QuotaDelegate) > receivedMessage = false; > [webView2 loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"qt2://test2.html"]]]; > [messageHandler setExpectedMessage: @"start"]; >- Util::run(&receivedMessage); >+ runUntil(receivedMessage); > > EXPECT_FALSE(delegate2.get().quotaDelegateCalled); > [delegate1 grantQuota]; > > [messageHandler setExpectedMessage: @"pass"]; > receivedMessage = false; >- Util::run(&receivedMessage); >+ runUntil(receivedMessage); > > while (!delegate2.get().quotaDelegateCalled) > TestWebKitAPI::Util::sleep(0.1); >@@ -251,7 +251,7 @@ TEST(WebKit, QuotaDelegate) > > [messageHandler setExpectedMessage: @"fail"]; > receivedMessage = false; >- Util::run(&receivedMessage); >+ runUntil(receivedMessage); > } > > TEST(WebKit, QuotaDelegateReload) >@@ -260,7 +260,7 @@ TEST(WebKit, QuotaDelegateReload) > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); > >@@ -281,23 +281,23 @@ TEST(WebKit, QuotaDelegateReload) > > receivedQuotaDelegateCalled = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"qt://test1.html"]]]; >- Util::run(&receivedQuotaDelegateCalled); >+ runUntil(receivedQuotaDelegateCalled); > > [delegate denyQuota]; > > [messageHandler setExpectedMessage: @"fail"]; > receivedMessage = false; >- Util::run(&receivedMessage); >+ runUntil(receivedMessage); > > receivedQuotaDelegateCalled = false; > [webView reload]; >- Util::run(&receivedQuotaDelegateCalled); >+ runUntil(receivedQuotaDelegateCalled); > > [delegate grantQuota]; > > [messageHandler setExpectedMessage: @"pass"]; > receivedMessage = false; >- Util::run(&receivedMessage); >+ runUntil(receivedMessage); > } > > TEST(WebKit, QuotaDelegateNavigateFragment) >@@ -306,7 +306,7 @@ TEST(WebKit, QuotaDelegateNavigateFragme > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); > >@@ -327,13 +327,13 @@ TEST(WebKit, QuotaDelegateNavigateFragme > > receivedQuotaDelegateCalled = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"qt://test1.html"]]]; >- Util::run(&receivedQuotaDelegateCalled); >+ runUntil(receivedQuotaDelegateCalled); > > [delegate denyQuota]; > > [messageHandler setExpectedMessage: @"fail"]; > receivedMessage = false; >- Util::run(&receivedMessage); >+ runUntil(receivedMessage); > > receivedQuotaDelegateCalled = false; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"qt://test1.html#fragment"]]]; >@@ -341,11 +341,11 @@ TEST(WebKit, QuotaDelegateNavigateFragme > > [messageHandler setExpectedMessage: @"start"]; > receivedMessage = false; >- Util::run(&receivedMessage); >+ runUntil(receivedMessage); > > [messageHandler setExpectedMessage: @"fail"]; > receivedMessage = false; >- Util::run(&receivedMessage); >+ runUntil(receivedMessage); > > EXPECT_FALSE(receivedQuotaDelegateCalled); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/StoreBlobThenDelete.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/StoreBlobThenDelete.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/StoreBlobThenDelete.mm (working copy) >@@ -63,7 +63,7 @@ TEST(IndexedDB, StoreBlobThenDelete) > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"StoreBlobToBeDeleted" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > EXPECT_WK_STREQ(@"Success", (NSString *)[lastScriptMessage body]); > > NSString *hash = WebCore::SQLiteFileSystem::computeHashForFileName("StoreBlobToBeDeleted"); >@@ -124,5 +124,5 @@ TEST(IndexedDB, StoreBlobThenDelete) > > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm (working copy) >@@ -72,7 +72,7 @@ TEST(WebKit, WKWebViewIsPlayingAudio) > [webView addObserver:observer.get() forKeyPath:@"_isPlayingAudio" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil]; > [webView synchronouslyLoadTestPageNamed:@"file-with-video"]; > [webView evaluateJavaScript:@"playVideo()" completionHandler:nil]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > @interface NoUIDelegate : NSObject <WKNavigationDelegate> >@@ -96,7 +96,7 @@ TEST(WebKit, WindowOpenWithoutUIDelegate > auto delegate = adoptNS([[NoUIDelegate alloc] init]); > [webView setNavigationDelegate:delegate.get()]; > [webView loadHTMLString:@"<script>window.open('simple2.html');window.location='simple.html'</script>" baseURL:[[NSBundle mainBundle] URLForResource:@"simple2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > @interface GeolocationDelegate : NSObject <WKUIDelegatePrivate> { >@@ -162,13 +162,13 @@ TEST(WebKit, GeolocationPermission) > auto delegate1 = adoptNS([[GeolocationDelegate alloc] initWithAllowGeolocation:false]); > [webView setUIDelegate:delegate1.get()]; > [webView loadHTMLString:html baseURL:[NSURL URLWithString:@"https://example.com/"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > auto delegate2 = adoptNS([[GeolocationDelegate alloc] initWithAllowGeolocation:true]); > [webView setUIDelegate:delegate2.get()]; > [webView loadHTMLString:html baseURL:[NSURL URLWithString:@"https://example.org/"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > @interface InjectedBundleNodeHandleIsSelectElementDelegate : NSObject <WKUIDelegatePrivate> >@@ -193,7 +193,7 @@ TEST(WebKit, InjectedBundleNodeHandleIsS > auto delegate = adoptNS([[InjectedBundleNodeHandleIsSelectElementDelegate alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > #if PLATFORM(MAC) >@@ -244,7 +244,7 @@ TEST(WebKit, ShowWebView) > auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 800, 600) configuration:configuration.get()]); > [webView setUIDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"test:///first"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > ASSERT_EQ(webViewFromDelegateCallback, createdWebView); > } >@@ -274,7 +274,7 @@ TEST(WebKit, PointerLock) > @"</script>" > ]; > [webView sendClicksAtPoint:NSMakePoint(200, 200) numberOfClicks:1]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > static bool resizableSet; >@@ -315,7 +315,7 @@ TEST(WebKit, RunModal) > NSString *html = [NSString stringWithFormat:@"%@%@%@", @"<script> function openModal() { window.showModalDialog('", url, @"'); } </script> <input type='button' value='Click to open modal' onclick='openModal();'>"]; > [webView synchronouslyLoadHTMLString:html]; > [webView sendClicksAtPoint:NSMakePoint(20, 600 - 20) numberOfClicks:1]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > static bool receivedWindowFrame; >@@ -354,8 +354,8 @@ TEST(WebKit, WindowFrame) > auto webView = adoptNS([[WKWebView alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView loadHTMLString:@"<script>moveBy(10,20);alert(outerWidth);</script>" baseURL:nil]; >- TestWebKitAPI::Util::run(&receivedWindowFrame); >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(receivedWindowFrame); >+ TestWebKitAPI::runUntil(done); > } > > static bool headerHeightCalled; >@@ -414,17 +414,17 @@ TEST(WebKit, PrintFrame) > auto delegate = adoptNS([[PrintDelegate alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView loadHTMLString:@"<head><title>test_title</title></head><body onload='print()'>hello world!</body>" baseURL:[NSURL URLWithString:@"http://example.com/"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > NSPrintOperation *operation = [webView _printOperationWithPrintInfo:[NSPrintInfo sharedPrintInfo]]; > EXPECT_TRUE(operation.canSpawnSeparateThread); > EXPECT_STREQ(operation.jobTitle.UTF8String, "test_title"); > > [operation runOperationModalForWindow:[webView hostWindow] delegate:nil didRunSelector:nil contextInfo:nil]; >- TestWebKitAPI::Util::run(&headerHeightCalled); >- TestWebKitAPI::Util::run(&footerHeightCalled); >- TestWebKitAPI::Util::run(&drawHeaderCalled); >- TestWebKitAPI::Util::run(&drawFooterCalled); >+ TestWebKitAPI::runUntil(headerHeightCalled); >+ TestWebKitAPI::runUntil(footerHeightCalled); >+ TestWebKitAPI::runUntil(drawHeaderCalled); >+ TestWebKitAPI::runUntil(drawFooterCalled); > } > > @interface NotificationDelegate : NSObject <WKUIDelegatePrivate> { >@@ -470,11 +470,11 @@ TEST(WebKit, NotificationPermission) > auto webView = adoptNS([[WKWebView alloc] init]); > [webView setUIDelegate:[[[NotificationDelegate alloc] initWithAllowNotifications:YES] autorelease]]; > [webView loadHTMLString:html baseURL:[NSURL URLWithString:@"http://example.org"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > [webView setUIDelegate:[[[NotificationDelegate alloc] initWithAllowNotifications:NO] autorelease]]; > [webView loadHTMLString:html baseURL:[NSURL URLWithString:@"http://example.com"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > @interface PlugInDelegate : NSObject <WKUIDelegatePrivate> >@@ -500,7 +500,7 @@ TEST(WebKit, UnavailablePlugIn) > [webView setUIDelegate:delegate.get()]; > [webView synchronouslyLoadHTMLString:@"<object type='application/x-shockwave-flash'/>"]; > [webView sendClicksAtPoint:NSMakePoint(210, 600 - 80) numberOfClicks:1]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > bool firstToolbarDone; >@@ -535,7 +535,7 @@ TEST(WebKit, ToolbarVisible) > auto delegate = adoptNS([[ToolbarDelegate alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView synchronouslyLoadHTMLString:@"<script>alert('visible:' + window.toolbar.visible);alert('visible:' + window.toolbar.visible)</script>"]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > @interface MouseMoveOverElementDelegate : NSObject <WKUIDelegatePrivate> >@@ -562,7 +562,7 @@ TEST(WebKit, MouseMoveOverElement) > [webView setUIDelegate:[[[MouseMoveOverElementDelegate alloc] init] autorelease]]; > [webView synchronouslyLoadHTMLString:@"<a href='http://example.com/path' title='link title'>link label</a>"]; > [webView mouseMoveToPoint:NSMakePoint(20, 600 - 20) withFlags:NSEventModifierFlagShift]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > static bool readyForClick; >@@ -596,11 +596,11 @@ TEST(WebKit, ClickAutoFillButton) > auto delegate = adoptNS([[AutoFillDelegate alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView evaluateJavaScript:@"" completionHandler: nil]; // Ensure the WebProcess and injected bundle are running. >- TestWebKitAPI::Util::run(&readyForClick); >+ TestWebKitAPI::runUntil(readyForClick); > NSPoint buttonLocation = NSMakePoint(130, 575); > [webView mouseDownAtPoint:buttonLocation simulatePressure:NO]; > [webView mouseUpAtPoint:buttonLocation]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > static bool readytoResign; >@@ -636,9 +636,9 @@ static void testDidResignInputElementStr > auto delegate = adoptNS([[DidResignInputElementStrongPasswordAppearanceDelegate alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView evaluateJavaScript:@"" completionHandler:nil]; // Make sure WebProcess and injected bundle are running. >- TestWebKitAPI::Util::run(&readytoResign); >+ TestWebKitAPI::runUntil(readytoResign); > [webView evaluateJavaScript:script completionHandler:nil]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST(WebKit, DidResignInputElementStrongPasswordAppearanceWhenTypeDidChange) >@@ -678,7 +678,7 @@ TEST(WebKit, AutoFillAvailable) > auto delegate = adoptNS([[AutoFillAvailableDelegate alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView evaluateJavaScript:@"" completionHandler: nil]; // Ensure the WebProcess and injected bundle are running. >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > @interface InjectedBundleNodeHandleIsTextFieldDelegate : NSObject <WKUIDelegatePrivate> >@@ -703,7 +703,7 @@ TEST(WebKit, InjectedBundleNodeHandleIsT > auto delegate = adoptNS([[InjectedBundleNodeHandleIsTextFieldDelegate alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > @interface PinnedStateObserver : NSObject >@@ -729,7 +729,7 @@ TEST(WebKit, PinnedState) > auto observer = adoptNS([[PinnedStateObserver alloc] init]); > [webView addObserver:observer.get() forKeyPath:@"_pinnedState" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil]; > [webView loadHTMLString:@"<body onload='scroll(100, 100)' style='height:10000vh;'/>" baseURL:[NSURL URLWithString:@"http://example.com/"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > @interface DidScrollDelegate : NSObject <WKUIDelegatePrivate> >@@ -750,7 +750,7 @@ TEST(WebKit, DidScroll) > auto delegate = adoptNS([[DidScrollDelegate alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView loadHTMLString:@"<body onload='scroll(100, 100)' style='height:10000vh;'/>" baseURL:[NSURL URLWithString:@"http://example.com/"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > static NSEvent *tabEvent(NSWindow *window, NSEventType type, NSEventModifierFlags flags) >@@ -793,7 +793,7 @@ TEST(WebKit, Focus) > NSString *html = @"<script>function loaded() { document.getElementById('in').focus(); alert('ready'); }</script>" > "<body onload='loaded()'><input type='text' id='in'></body>"; > [webView loadHTMLString:html baseURL:[NSURL URLWithString:@"http://example.com/"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > ASSERT_EQ(takenDirection, _WKFocusDirectionBackward); > } > >@@ -834,7 +834,7 @@ TEST(WebKit, SaveDataToFile) > [webView setNavigationDelegate:delegate.get()]; > NSURL *pdfURL = [[NSBundle mainBundle] URLForResource:@"test" withExtension:@"pdf" subdirectory:@"TestWebKitAPI.resources"]; > [webView loadRequest:[NSURLRequest requestWithURL:pdfURL]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > #endif // MOUSE_EVENT_CAUSES_DOWNLOAD >@@ -880,7 +880,7 @@ TEST(WebKit, DidNotHandleWheelEvent) > auto delegate = adoptNS([[WheelDelegate alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView loadHTMLString:@"<body onload='alert(\"ready\")' onwheel='()=>{}' style='overflow:hidden; height:10000vh;'></body>" baseURL:[NSURL URLWithString:@"http://example.com/"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > #endif // RELIABLE_DID_NOT_HANDLE_WHEEL_EVENT >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm (working copy) >@@ -84,7 +84,7 @@ TEST(WKUserContentController, ScriptMess > > [webView evaluateJavaScript:@"window.webkit.messageHandlers.testHandler.postMessage('Hello')" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > > EXPECT_WK_STREQ(@"Hello", (NSString *)[scriptMessages[0] body]); >@@ -111,13 +111,13 @@ TEST(WKUserContentController, ScriptMess > isDoneWithNavigation = false; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > > EXPECT_WK_STREQ(@"Hello", (NSString *)[scriptMessages[0] body]); > > if (!isDoneWithNavigation) >- TestWebKitAPI::Util::run(&isDoneWithNavigation); >+ TestWebKitAPI::runUntil(isDoneWithNavigation); > > __block bool isDoneEvaluatingScript = false; > __block NSString *resultValue = @""; >@@ -134,7 +134,7 @@ TEST(WKUserContentController, ScriptMess > isDoneEvaluatingScript = true; > }]; > >- TestWebKitAPI::Util::run(&isDoneEvaluatingScript); >+ TestWebKitAPI::runUntil(isDoneEvaluatingScript); > > EXPECT_WK_STREQ(@"PASS", resultValue); > } >@@ -162,7 +162,7 @@ TEST(WKUserContentController, ScriptMess > " window.webkit.messageHandlers.handlerToPost.postMessage('FAIL');" > "}" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > > EXPECT_WK_STREQ(@"PASS", (NSString *)[scriptMessages[0] body]); >@@ -177,7 +177,7 @@ TEST(WKUserContentController, ScriptMess > " window.webkit.messageHandlers.handlerToPost.postMessage('PASS');" > "}" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > > EXPECT_WK_STREQ(@"PASS", (NSString *)[scriptMessages[0] body]); >@@ -210,7 +210,7 @@ TEST(WKUserContentController, ScriptMess > " window.webkit.messageHandlers.handlerToPost.postMessage('PASS');" > "}" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > > EXPECT_WK_STREQ(@"PASS", (NSString *)[scriptMessages[0] body]); >@@ -250,7 +250,7 @@ TEST(WKUserContentController, ScriptMess > " window.webkit.messageHandlers.handlerToPost.postMessage('PASS');" > "}" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > > EXPECT_WK_STREQ(@"PASS", (NSString *)[scriptMessages[0] body]); >@@ -271,7 +271,7 @@ TEST(WKUserContentController, ScriptMess > > [webView evaluateJavaScript:@"window.webkit.messageHandlers.testHandler.postMessage('First Message')" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > > EXPECT_WK_STREQ(@"First Message", (NSString *)[scriptMessages[0] body]); > >@@ -282,7 +282,7 @@ TEST(WKUserContentController, ScriptMess > > [webView evaluateJavaScript:@"window.webkit.messageHandlers.testHandler.postMessage('Second Message')" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > > EXPECT_WK_STREQ(@"Second Message", (NSString *)[scriptMessages[1] body]); > } >@@ -305,7 +305,7 @@ TEST(WKUserContentController, ScriptMess > // Test that handlerToReplace was succesfully added. > [webView evaluateJavaScript:@"window.webkit.messageHandlers.handlerToReplace.postMessage('PASS1');" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > > EXPECT_WK_STREQ(@"PASS1", (NSString *)[scriptMessages[0] body]); >@@ -316,7 +316,7 @@ TEST(WKUserContentController, ScriptMess > // Test that handlerToReplace still works. > [webView evaluateJavaScript:@"window.webkit.messageHandlers.handlerToReplace.postMessage('PASS2');" completionHandler:nil]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > > EXPECT_WK_STREQ(@"PASS2", (NSString *)[scriptMessages[1] body]); >@@ -339,7 +339,7 @@ static void expectScriptEvaluatesToColor > didCheckBackgroundColor = true; > }]; > >- TestWebKitAPI::Util::run(&didCheckBackgroundColor); >+ TestWebKitAPI::runUntil(didCheckBackgroundColor); > didCheckBackgroundColor = false; > } > >@@ -592,7 +592,7 @@ TEST(WKUserContentController, UserScript > static void waitForMessages(size_t expectedCount) > { > while (scriptMessages.size() < expectedCount) { >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > receivedScriptMessage = false; > } > } >@@ -622,7 +622,7 @@ TEST(WKUserContentController, InjectUser > > isDoneWithNavigation = false; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&isDoneWithNavigation); >+ TestWebKitAPI::runUntil(isDoneWithNavigation); > > receivedScriptMessage = false; > [[configuration userContentController] _addUserScriptImmediately:startAllFrames.get()]; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentWorld.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentWorld.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentWorld.mm (working copy) >@@ -72,7 +72,7 @@ TEST(UserContentWorld, NormalWorldUserSc > }]; > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(UserContentWorld, IsolatedWorld) >@@ -107,7 +107,7 @@ TEST(UserContentWorld, IsolatedWorldUser > }]; > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > static bool didObserveNormalWorld; >@@ -149,6 +149,6 @@ [[webView _remoteObjectRegistry] reg > > [webView loadHTMLString:@"<body style='background-color: red;'></body>" baseURL:nil]; > >- TestWebKitAPI::Util::run(&didObserveNormalWorld); >- TestWebKitAPI::Util::run(&didObserveWorldWithName); >+ TestWebKitAPI::runUntil(didObserveNormalWorld); >+ TestWebKitAPI::runUntil(didObserveWorldWithName); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/UserInitiatedActionInNavigationAction.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/UserInitiatedActionInNavigationAction.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/UserInitiatedActionInNavigationAction.mm (working copy) >@@ -90,7 +90,7 @@ public: > void loadTest(NSString *test) > { > [webView loadRequest:[NSURLRequest requestWithURL:URLWithFragment(test)]]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > } > >@@ -141,7 +141,7 @@ TEST_F(UserInitiatedActionTest, MailtoIn > > click(); > >- TestWebKitAPI::Util::run(&finishedPolicy); >+ TestWebKitAPI::runUntil(finishedPolicy); > } > > TEST_F(UserInitiatedActionTest, MailtoInLoopAfterTimer) >@@ -182,7 +182,7 @@ TEST_F(UserInitiatedActionTest, MailtoIn > > click(); > >- TestWebKitAPI::Util::run(&finishedPolicy); >+ TestWebKitAPI::runUntil(finishedPolicy); > } > > TEST_F(UserInitiatedActionTest, MailtoInLoopAfterPostMessage) >@@ -223,7 +223,7 @@ TEST_F(UserInitiatedActionTest, MailtoIn > > click(); > >- TestWebKitAPI::Util::run(&finishedPolicy); >+ TestWebKitAPI::runUntil(finishedPolicy); > } > > TEST_F(UserInitiatedActionTest, MailtoInLoopAfterLongTimer) >@@ -252,7 +252,7 @@ TEST_F(UserInitiatedActionTest, MailtoIn > > click(); > >- TestWebKitAPI::Util::run(&finishedPolicy); >+ TestWebKitAPI::runUntil(finishedPolicy); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm (working copy) >@@ -104,7 +104,7 @@ public: > wasPrompted = false; > receivedScriptMessage = false; > [m_webView loadTestPageNamed:@"disableGetUserMedia"]; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > EXPECT_STREQ([(NSString *)[lastScriptMessage body] UTF8String], message); > } > >@@ -138,6 +138,6 @@ TEST_F(MediaCaptureDisabledTest, Unsecur > receivedScriptMessage = false; > [m_webView loadHTMLString:@"<html><body><script>window.webkit.messageHandlers.testHandler.postMessage(Navigator.prototype.hasOwnProperty('mediaDevices') ? 'has' : 'none');</script></body></html>" baseURL: [[NSURL alloc] initWithString:@"http://test.org"]]; > >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > EXPECT_STREQ([(NSString *)[lastScriptMessage body] UTF8String], "none"); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm (working copy) >@@ -104,7 +104,7 @@ public: > wasPrompted = false; > receivedScriptMessage = false; > [m_webView loadTestPageNamed:@"disableGetUserMedia"]; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > EXPECT_STREQ([(NSString *)[lastScriptMessage body] UTF8String], message); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm (working copy) >@@ -60,7 +60,7 @@ - (void)expectControlsManager:(BOOL)expe > doneWaiting = true; > }]; > >- TestWebKitAPI::Util::run(&doneWaiting); >+ TestWebKitAPI::runUntil(doneWaiting); > } > > - (void)waitForMediaControlsToShow >@@ -95,15 +95,15 @@ - (void)waitForPageToLoadWithAutoplaying > }]; > } > >- TestWebKitAPI::Util::run(&pageHasLoaded); >- TestWebKitAPI::Util::run(&autoplayingIsFinished); >+ TestWebKitAPI::runUntil(pageHasLoaded); >+ TestWebKitAPI::runUntil(autoplayingIsFinished); > } > > - (NSString *)controlledElementID > { > _isDoneQueryingControlledElementID = false; > [self _requestControlledElementID]; >- TestWebKitAPI::Util::run(&_isDoneQueryingControlledElementID); >+ TestWebKitAPI::runUntil(_isDoneQueryingControlledElementID); > return _controlledElementID; > } > >@@ -223,7 +223,7 @@ TEST(VideoControlsManager, VideoControls > firstVideoPaused = true; > }]; > >- TestWebKitAPI::Util::run(&secondVideoPaused); >+ TestWebKitAPI::runUntil(secondVideoPaused); > } > // FIXME: Re-enable this test once <webkit.org/b/175909> is resolved. > TEST(VideoControlsManager, DISABLED_VideoControlsManagerMultipleVideosSwitchControlledVideoWhenScrolling) >@@ -345,7 +345,7 @@ TEST(VideoControlsManager, DISABLED_Vide > > [webView mouseDownAtPoint:NSMakePoint(200, 200) simulatePressure:YES]; > >- TestWebKitAPI::Util::run(&secondAudioPlaying); >+ TestWebKitAPI::runUntil(secondAudioPlaying); > while ([[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]) { > if ([webView _hasActiveVideoForControlsManager] && [[webView controlledElementID] isEqualToString:@"second"]) > break; >@@ -369,7 +369,7 @@ TEST(VideoControlsManager, VideoControls > finishedTest = true; > }]; > >- TestWebKitAPI::Util::run(&finishedTest); >+ TestWebKitAPI::runUntil(finishedTest); > } > > TEST(VideoControlsManager, VideoControlsManagerDoesNotShowMediaControlsForOffscreenVideo) >@@ -411,7 +411,7 @@ TEST(VideoControlsManager, VideoControls > NSURL *urlOfVideo = [[NSBundle mainBundle] URLForResource:@"video-with-audio" withExtension:@"mp4" subdirectory:@"TestWebKitAPI.resources"]; > [webView loadFileURL:urlOfVideo allowingReadAccessToURL:[urlOfVideo URLByDeletingLastPathComponent]]; > >- TestWebKitAPI::Util::run(&finishedLoad); >+ TestWebKitAPI::runUntil(finishedLoad); > > // We expect the media controller to be present because this is a media document. > EXPECT_TRUE([webView _hasActiveVideoForControlsManager]); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm (working copy) >@@ -254,7 +254,7 @@ - (_WKAttachment *)synchronouslyInsertAt > RetainPtr<_WKAttachment> attachment = [self _insertAttachmentWithFileWrapper:fileWrapper contentType:contentType completion:^(BOOL) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > return attachment.autorelease(); > } > >@@ -267,7 +267,7 @@ - (_WKAttachment *)synchronouslyInsertAt > RetainPtr<_WKAttachment> attachment = [self _insertAttachmentWithFileWrapper:fileWrapper.get() contentType:contentType completion:^(BOOL) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > return attachment.autorelease(); > } > >@@ -279,7 +279,7 @@ - (CGPoint)attachmentElementMidPoint > midPoint = CGPointMake(result.firstObject.floatValue, result.lastObject.floatValue); > doneEvaluatingScript = true; > }]; >- TestWebKitAPI::Util::run(&doneEvaluatingScript); >+ TestWebKitAPI::runUntil(doneEvaluatingScript); > return midPoint; > } > >@@ -291,7 +291,7 @@ - (CGSize)attachmentElementSize > size = CGSizeMake(sizeResult.firstObject.floatValue, sizeResult.lastObject.floatValue); > doneEvaluatingScript = true; > }]; >- TestWebKitAPI::Util::run(&doneEvaluatingScript); >+ TestWebKitAPI::runUntil(doneEvaluatingScript); > return size; > } > >@@ -303,7 +303,7 @@ - (CGSize)imageElementSize > size = CGSizeMake(sizeResult.firstObject.floatValue, sizeResult.lastObject.floatValue); > doneEvaluatingScript = true; > }]; >- TestWebKitAPI::Util::run(&doneEvaluatingScript); >+ TestWebKitAPI::runUntil(doneEvaluatingScript); > return size; > } > >@@ -355,7 +355,7 @@ - (void)synchronouslySetFileWrapper:(NSF > done = true; > }]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > if (error) > *error = resultError.autorelease(); >@@ -374,7 +374,7 @@ - (void)synchronouslySetData:(NSData *)d > done = true; > }]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > if (error) > *error = resultError.autorelease(); >@@ -477,7 +477,7 @@ - (void)expectType:(NSString *)type with > NSLog(@"Encountered error when loading data: %@", error); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > @end >@@ -1244,7 +1244,7 @@ TEST(WKAttachmentTests, InvalidateAttach > > ObserveAttachmentUpdatesForScope observer(webView.get()); > [webView _killWebContentProcess]; >- TestWebKitAPI::Util::run(&webProcessTerminated); >+ TestWebKitAPI::runUntil(webProcessTerminated); > > observer.expectAttachmentUpdates(@[ pdfAttachment.get() ], @[ ]); > EXPECT_FALSE([pdfAttachment isConnected]); >@@ -1366,7 +1366,7 @@ TEST(WKAttachmentTests, AddAttachmentToC > auto attachment = retainPtr([webView _attachmentForIdentifier:attachmentIdentifier]); > EXPECT_WK_STREQ(attachmentIdentifier, [attachment uniqueIdentifier]); > EXPECT_WK_STREQ(attachmentIdentifier, [webView stringByEvaluatingJavaScript:@"document.querySelector('img').attachmentIdentifier"]); >- Util::run(&doneWaitingForAttachmentInsertion); >+ runUntil(doneWaitingForAttachmentInsertion); > observer.expectAttachmentUpdates(@[ ], @[ attachment.get() ]); > > auto firstImage = adoptNS([[NSFileWrapper alloc] initWithURL:testImageFileURL() options:0 error:nil]); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm (working copy) >@@ -52,7 +52,7 @@ TEST_F(WKContentRuleListStoreTest, Compi > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > } > > static NSString *invalidFilter = @"["; >@@ -75,7 +75,7 @@ TEST_F(WKContentRuleListStoreTest, Inval > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > } > > TEST_F(WKContentRuleListStoreTest, Lookup) >@@ -88,7 +88,7 @@ TEST_F(WKContentRuleListStoreTest, Looku > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > __block bool doneLookingUp = false; > [[WKContentRuleListStore defaultStore] lookUpContentRuleListForIdentifier:@"TestRuleList" completionHandler:^(WKContentRuleList *filter, NSError *error) { >@@ -99,7 +99,7 @@ TEST_F(WKContentRuleListStoreTest, Looku > > doneLookingUp = true; > }]; >- TestWebKitAPI::Util::run(&doneLookingUp); >+ TestWebKitAPI::runUntil(doneLookingUp); > } > > TEST_F(WKContentRuleListStoreTest, EncodedIdentifier) >@@ -120,7 +120,7 @@ TEST_F(WKContentRuleListStoreTest, Encod > done = true; > }]; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST_F(WKContentRuleListStoreTest, NonExistingIdentifierLookup) >@@ -136,7 +136,7 @@ TEST_F(WKContentRuleListStoreTest, NonEx > > doneLookingUp = true; > }]; >- TestWebKitAPI::Util::run(&doneLookingUp); >+ TestWebKitAPI::runUntil(doneLookingUp); > } > > TEST_F(WKContentRuleListStoreTest, VersionMismatch) >@@ -150,7 +150,7 @@ TEST_F(WKContentRuleListStoreTest, Versi > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > [[WKContentRuleListStore defaultStore] _invalidateContentRuleListVersionForIdentifier:@"TestRuleList"]; > >@@ -166,14 +166,14 @@ TEST_F(WKContentRuleListStoreTest, Versi > > doneLookingUp = true; > }]; >- TestWebKitAPI::Util::run(&doneLookingUp); >+ TestWebKitAPI::runUntil(doneLookingUp); > > __block bool doneGettingSource = false; > [[WKContentRuleListStore defaultStore] _getContentRuleListSourceForIdentifier:@"TestRuleList" completionHandler:^(NSString* source) { > EXPECT_NULL(source); > doneGettingSource = true; > }]; >- TestWebKitAPI::Util::run(&doneGettingSource); >+ TestWebKitAPI::runUntil(doneGettingSource); > } > > TEST_F(WKContentRuleListStoreTest, Removal) >@@ -186,7 +186,7 @@ TEST_F(WKContentRuleListStoreTest, Remov > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > __block bool doneRemoving = false; > [[WKContentRuleListStore defaultStore] removeContentRuleListForIdentifier:@"TestRuleList" completionHandler:^(NSError *error) { >@@ -194,7 +194,7 @@ TEST_F(WKContentRuleListStoreTest, Remov > > doneRemoving = true; > }]; >- TestWebKitAPI::Util::run(&doneRemoving); >+ TestWebKitAPI::runUntil(doneRemoving); > } > > TEST_F(WKContentRuleListStoreTest, NonExistingIdentifierRemove) >@@ -208,7 +208,7 @@ TEST_F(WKContentRuleListStoreTest, NonEx > > doneRemoving = true; > }]; >- TestWebKitAPI::Util::run(&doneRemoving); >+ TestWebKitAPI::runUntil(doneRemoving); > } > > TEST_F(WKContentRuleListStoreTest, NonDefaultStore) >@@ -224,7 +224,7 @@ TEST_F(WKContentRuleListStoreTest, NonDe > EXPECT_EQ(identifiers.count, 0u); > doneGettingAvailableIdentifiers = true; > }]; >- TestWebKitAPI::Util::run(&doneGettingAvailableIdentifiers); >+ TestWebKitAPI::runUntil(doneGettingAvailableIdentifiers); > > __block bool doneCompiling = false; > [store compileContentRuleListForIdentifier:identifier encodedContentRuleList:basicFilter completionHandler:^(WKContentRuleList *filter, NSError *error) { >@@ -232,7 +232,7 @@ TEST_F(WKContentRuleListStoreTest, NonDe > EXPECT_NULL(error); > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > doneGettingAvailableIdentifiers = false; > [store getAvailableContentRuleListIdentifiers:^(NSArray<NSString *> *identifiers) { >@@ -241,7 +241,7 @@ TEST_F(WKContentRuleListStoreTest, NonDe > EXPECT_STREQ(identifiers[0].UTF8String, "TestRuleList"); > doneGettingAvailableIdentifiers = true; > }]; >- TestWebKitAPI::Util::run(&doneGettingAvailableIdentifiers); >+ TestWebKitAPI::runUntil(doneGettingAvailableIdentifiers); > > NSData *data = [NSData dataWithContentsOfURL:[tempDir URLByAppendingPathComponent:fileName]]; > EXPECT_NOT_NULL(data); >@@ -253,14 +253,14 @@ TEST_F(WKContentRuleListStoreTest, NonDe > EXPECT_STREQ(basicFilter.UTF8String, source.UTF8String); > doneCheckingSource = true; > }]; >- TestWebKitAPI::Util::run(&doneCheckingSource); >+ TestWebKitAPI::runUntil(doneCheckingSource); > > __block bool doneRemoving = false; > [store removeContentRuleListForIdentifier:identifier completionHandler:^(NSError *error) { > EXPECT_NULL(error); > doneRemoving = true; > }]; >- TestWebKitAPI::Util::run(&doneRemoving); >+ TestWebKitAPI::runUntil(doneRemoving); > > NSData *dataAfterRemoving = [NSData dataWithContentsOfURL:[tempDir URLByAppendingPathComponent:fileName]]; > EXPECT_NULL(dataAfterRemoving); >@@ -284,7 +284,7 @@ TEST_F(WKContentRuleListStoreTest, Multi > }]; > }]; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST_F(WKContentRuleListStoreTest, NonASCIISource) >@@ -311,7 +311,7 @@ TEST_F(WKContentRuleListStoreTest, NonAS > done = true; > }]; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > static size_t alertCount { 0 }; >@@ -354,7 +354,7 @@ TEST_F(WKContentRuleListStoreTest, AddRe > ruleList = compiledRuleList; > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > EXPECT_NOT_NULL(ruleList); > > auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -369,13 +369,13 @@ TEST_F(WKContentRuleListStoreTest, AddRe > alertCount = 0; > receivedAlert = false; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > > [[configuration userContentController] removeContentRuleList:ruleList.get()]; > > receivedAlert = false; > [webView reload]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > } > > #if PLATFORM(IOS_FAMILY) >@@ -395,7 +395,7 @@ TEST_F(WKContentRuleListStoreTest, Unsaf > EXPECT_NULL(error); > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > auto hasCompleteProtection = [] (const RetainPtr<NSString>& path) { > NSError *error = nil; >@@ -420,7 +420,7 @@ TEST_F(WKContentRuleListStoreTest, Unsaf > EXPECT_NULL(error); > doneLookingUp = true; > }]; >- TestWebKitAPI::Util::run(&doneLookingUp); >+ TestWebKitAPI::runUntil(doneLookingUp); > EXPECT_FALSE(hasCompleteProtection(copiedFilePath)); > > __block bool doneRemoving = false; >@@ -431,6 +431,6 @@ TEST_F(WKContentRuleListStoreTest, Unsaf > doneRemoving = true; > }]; > }]; >- TestWebKitAPI::Util::run(&doneRemoving); >+ TestWebKitAPI::runUntil(doneRemoving); > } > #endif // PLATFORM(IOS_FAMILY) >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm (working copy) >@@ -57,7 +57,7 @@ TEST(WebKit, WKContentViewEditingActions > }]; > }]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_WK_STREQ("Hello world", [[UIPasteboard generalPasteboard] string]); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm (working copy) >@@ -71,7 +71,7 @@ static void runTestWithWebsiteDataStore( > gotFlag = true; > }]; > >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > // Triggering removeData when we don't have plugin data to remove should not trigger the plugin process to launch. >@@ -90,7 +90,7 @@ static void runTestWithWebsiteDataStore( > gotFlag = true; > }]; > >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > > ASSERT_EQ(cookies.count, 0u); > [cookies release]; >@@ -119,14 +119,14 @@ static void runTestWithWebsiteDataStore( > gotFlag = true; > }]; > >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > [globalCookieStore setCookie:cookie2.get() completionHandler:[](){ > gotFlag = true; > }]; > >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > [globalCookieStore getAllCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) { >@@ -134,7 +134,7 @@ static void runTestWithWebsiteDataStore( > gotFlag = true; > }]; > >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > ASSERT_EQ(cookies.count, 2u); >@@ -162,7 +162,7 @@ static void runTestWithWebsiteDataStore( > gotFlag = true; > }]; > >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > [globalCookieStore getAllCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) { >@@ -170,7 +170,7 @@ static void runTestWithWebsiteDataStore( > gotFlag = true; > }]; > >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > ASSERT_EQ(cookies.count, 1u); >@@ -202,7 +202,7 @@ TEST(WebKit, WKHTTPCookieStoreProcessPri > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:[] { > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > globalCookieStore = [[WKWebsiteDataStore defaultDataStore] httpCookieStore]; >@@ -217,7 +217,7 @@ TEST(WebKit, WKHTTPCookieStoreProcessPri > [globalCookieStore setCookie:cookie.get() completionHandler:[]() { > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > >@@ -225,7 +225,7 @@ TEST(WebKit, WKHTTPCookieStoreProcessPri > ASSERT_EQ(1u, cookies.count); > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > } > >@@ -243,7 +243,7 @@ TEST(WebKit, WKHTTPCookieStoreHttpOnly) > [dataStore removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:[] { > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > globalCookieStore = dataStore.httpCookieStore; >@@ -253,7 +253,7 @@ TEST(WebKit, WKHTTPCookieStoreHttpOnly) > *cookiesPtr = [nsCookies retain]; > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > ASSERT_EQ(cookies.count, 0u); > [cookies release]; >@@ -277,21 +277,21 @@ TEST(WebKit, WKHTTPCookieStoreHttpOnly) > [globalCookieStore setCookie:httpOnlyCookie.get() completionHandler:[]() { > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > // Setting httpOnlyCookie2 should succeed. > [globalCookieStore setCookie:httpOnlyCookie2.get() completionHandler:[]() { > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > [globalCookieStore getAllCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) { > *cookiesPtr = [nsCookies retain]; > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > ASSERT_EQ(cookies.count, 1u); > EXPECT_TRUE([[[cookies objectAtIndex:0] value] isEqual:@"cookieValue2"]); >@@ -301,14 +301,14 @@ TEST(WebKit, WKHTTPCookieStoreHttpOnly) > [globalCookieStore setCookie:notHttpOnlyCookie.get() completionHandler:[]() { > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > [globalCookieStore getAllCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) { > *cookiesPtr = [nsCookies retain]; > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > ASSERT_EQ(cookies.count, 1u); > EXPECT_TRUE([[cookies objectAtIndex:0] isHTTPOnly]); >@@ -318,14 +318,14 @@ TEST(WebKit, WKHTTPCookieStoreHttpOnly) > [globalCookieStore deleteCookie:notHttpOnlyCookie.get() completionHandler:[]() { > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > [globalCookieStore getAllCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) { > *cookiesPtr = [nsCookies retain]; > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > ASSERT_EQ(cookies.count, 1u); > [cookies release]; >@@ -334,14 +334,14 @@ TEST(WebKit, WKHTTPCookieStoreHttpOnly) > [globalCookieStore deleteCookie:httpOnlyCookie.get() completionHandler:[]() { > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > [globalCookieStore getAllCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) { > *cookiesPtr = [nsCookies retain]; > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > ASSERT_EQ(cookies.count, 0u); > [cookies release]; >@@ -361,7 +361,7 @@ TEST(WebKit, WKHTTPCookieStoreCreationTi > [dataStore removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:[] { > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > globalCookieStore = dataStore.httpCookieStore; >@@ -378,7 +378,7 @@ TEST(WebKit, WKHTTPCookieStoreCreationTi > [globalCookieStore setCookie:cookie.get() completionHandler:[]() { > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > [globalCookieStore getAllCookies:[&](NSArray<NSHTTPCookie *> *cookies) { >@@ -387,7 +387,7 @@ TEST(WebKit, WKHTTPCookieStoreCreationTi > EXPECT_TRUE([creationTime.get() isEqual:createdTime]); > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > > sleep(1_s); >@@ -398,7 +398,7 @@ TEST(WebKit, WKHTTPCookieStoreCreationTi > EXPECT_TRUE([creationTime.get() isEqual:createdTime]); > gotFlag = true; > }]; >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > gotFlag = false; > } > #endif // (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) >@@ -458,7 +458,7 @@ TEST(WebKit, CookieObserverCrash) > gotFlag = true; > }]; > >- TestWebKitAPI::Util::run(&gotFlag); >+ TestWebKitAPI::runUntil(gotFlag); > } > > static bool finished; >@@ -506,7 +506,7 @@ void runWKHTTPCookieStoreWithoutProcessP > finished = true; > }]; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > > finished = false; > [ephemeralStoreWithCookies.get().httpCookieStore setCookie:sessionCookie.get() completionHandler:^{ >@@ -515,7 +515,7 @@ void runWKHTTPCookieStoreWithoutProcessP > finished = true; > }]; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > finished = false; > > auto processPoolConfiguration = adoptNS([[_WKProcessPoolConfiguration alloc] init]); >@@ -529,7 +529,7 @@ void runWKHTTPCookieStoreWithoutProcessP > auto delegate = adoptNS([[CookieUIDelegate alloc] init]); > webView.get().UIDelegate = delegate.get(); > [webView loadHTMLString:alertCookieHTML baseURL:[NSURL URLWithString:@"http://127.0.0.1"]]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > > finished = false; > [ephemeralStoreWithCookies.get().httpCookieStore deleteCookie:sessionCookie.get() completionHandler:^{ >@@ -538,7 +538,7 @@ void runWKHTTPCookieStoreWithoutProcessP > finished = true; > }]; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > > // DefaultDataStore > auto defaultStore = [WKWebsiteDataStore defaultDataStore]; >@@ -546,7 +546,7 @@ void runWKHTTPCookieStoreWithoutProcessP > [defaultStore removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:[] { > finished = true; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > > finished = false; > [defaultStore.httpCookieStore setCookie:persistentCookie.get() completionHandler:^{ >@@ -555,7 +555,7 @@ void runWKHTTPCookieStoreWithoutProcessP > finished = true; > }]; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > > finished = false; > [defaultStore.httpCookieStore setCookie:sessionCookie.get() completionHandler:^{ >@@ -564,7 +564,7 @@ void runWKHTTPCookieStoreWithoutProcessP > finished = true; > }]; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > > finished = false; > configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >@@ -572,7 +572,7 @@ void runWKHTTPCookieStoreWithoutProcessP > webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > webView.get().UIDelegate = delegate.get(); > [webView loadHTMLString:alertCookieHTML baseURL:[NSURL URLWithString:@"http://127.0.0.1"]]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > } > > TEST(WebKit, WKHTTPCookieStoreWithoutProcessPoolWithoutPrewarming) >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm (working copy) >@@ -87,7 +87,7 @@ TEST(WebKit, WKNavigationResponseJSONMIM > > NSURL *testURL = [NSURL URLWithString:@"test:///json-response"]; > [webView loadRequest:[NSURLRequest requestWithURL:testURL]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WebKit, WKNavigationResponseJSONMIMEType2) >@@ -105,7 +105,7 @@ TEST(WebKit, WKNavigationResponseJSONMIM > > NSURL *testURL = [NSURL URLWithString:@"test:///json-response"]; > [webView loadRequest:[NSURLRequest requestWithURL:testURL]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WebKit, WKNavigationResponseUnknownMIMEType) >@@ -123,7 +123,7 @@ TEST(WebKit, WKNavigationResponseUnknown > > NSURL *testURL = [NSURL URLWithString:@"test:///json-response"]; > [webView loadRequest:[NSURLRequest requestWithURL:testURL]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WebKit, WKNavigationResponsePDFType) >@@ -143,7 +143,7 @@ TEST(WebKit, WKNavigationResponsePDFType > > NSURL *testURL = [NSURL URLWithString:@"test:///pdf-response"]; > [webView loadRequest:[NSURLRequest requestWithURL:testURL]]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > @interface NavigationResponseTestDelegate : NSObject <WKNavigationDelegate> >@@ -167,13 +167,13 @@ - (WKNavigationResponse *)navigationResp > - (void)waitForNavigationResponseCallback > { > _hasReceivedResponseCallback = false; >- TestWebKitAPI::Util::run(&_hasReceivedResponseCallback); >+ TestWebKitAPI::runUntil(_hasReceivedResponseCallback); > } > > - (void)waitForNavigationFinishedCallback > { > _hasReceivedNavigationFinishedCallback = false; >- TestWebKitAPI::Util::run(&_hasReceivedNavigationFinishedCallback); >+ TestWebKitAPI::runUntil(_hasReceivedNavigationFinishedCallback); > } > > - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm (working copy) >@@ -118,7 +118,7 @@ TEST(WKPDFView, CountString) > > NSString *expectedString = @"Two"; > [webView _countStringMatches:expectedString options:0 maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(1U, [findDelegate matchesCount]); > EXPECT_FALSE([findDelegate didFail]); >@@ -133,7 +133,7 @@ TEST(WKPDFView, CountStringMissing) > > NSString *expectedString = @"One"; > [webView _countStringMatches:expectedString options:0 maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(0U, [findDelegate matchesCount]); > EXPECT_FALSE([findDelegate didFail]); >@@ -148,7 +148,7 @@ TEST(WKPDFView, CountStringCaseInsensiti > > NSString *expectedString = @"t"; > [webView _countStringMatches:expectedString options:_WKFindOptionsCaseInsensitive maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(5U, [findDelegate matchesCount]); > EXPECT_FALSE([findDelegate didFail]); >@@ -163,7 +163,7 @@ TEST(WKPDFView, FindString) > > NSString *expectedString = @"one"; > [webView _findString:expectedString options:0 maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(1U, [findDelegate matchesCount]); > EXPECT_EQ(0, [findDelegate matchIndex]); >@@ -179,7 +179,7 @@ TEST(WKPDFView, FindStringMissing) > > NSString *expectedString = @"One"; > [webView _findString:expectedString options:0 maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_TRUE([findDelegate didFail]); > EXPECT_WK_STREQ(expectedString, [findDelegate findString]); >@@ -193,7 +193,7 @@ TEST(WKPDFView, FindStringCaseInsensitiv > > NSString *expectedString = @"t"; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(5U, [findDelegate matchesCount]); > EXPECT_EQ(0, [findDelegate matchIndex]); >@@ -202,7 +202,7 @@ TEST(WKPDFView, FindStringCaseInsensitiv > > isDone = NO; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(5U, [findDelegate matchesCount]); > EXPECT_EQ(1, [findDelegate matchIndex]); >@@ -211,7 +211,7 @@ TEST(WKPDFView, FindStringCaseInsensitiv > > isDone = NO; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive | _WKFindOptionsBackwards maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(5U, [findDelegate matchesCount]); > EXPECT_EQ(0, [findDelegate matchIndex]); >@@ -227,7 +227,7 @@ TEST(WKPDFView, FindStringBackward) > > NSString *expectedString = @"t"; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive | _WKFindOptionsBackwards maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(5U, [findDelegate matchesCount]); > EXPECT_EQ(4, [findDelegate matchIndex]); >@@ -236,7 +236,7 @@ TEST(WKPDFView, FindStringBackward) > > isDone = NO; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive | _WKFindOptionsBackwards maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(5U, [findDelegate matchesCount]); > EXPECT_EQ(3, [findDelegate matchIndex]); >@@ -245,7 +245,7 @@ TEST(WKPDFView, FindStringBackward) > > isDone = NO; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(5U, [findDelegate matchesCount]); > EXPECT_EQ(4, [findDelegate matchIndex]); >@@ -261,7 +261,7 @@ TEST(WKPDFView, FindStringPastEnd) > > NSString *expectedString = @"two"; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(2U, [findDelegate matchesCount]); > EXPECT_EQ(0, [findDelegate matchIndex]); >@@ -270,7 +270,7 @@ TEST(WKPDFView, FindStringPastEnd) > > isDone = NO; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(2U, [findDelegate matchesCount]); > EXPECT_EQ(1, [findDelegate matchIndex]); >@@ -279,7 +279,7 @@ TEST(WKPDFView, FindStringPastEnd) > > isDone = NO; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_TRUE([findDelegate didFail]); > EXPECT_WK_STREQ(expectedString, [findDelegate findString]); >@@ -293,7 +293,7 @@ TEST(WKPDFView, FindStringBackwardPastSt > > NSString *expectedString = @"two"; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive | _WKFindOptionsBackwards maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(2U, [findDelegate matchesCount]); > EXPECT_EQ(1, [findDelegate matchIndex]); >@@ -302,7 +302,7 @@ TEST(WKPDFView, FindStringBackwardPastSt > > isDone = NO; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive | _WKFindOptionsBackwards maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_EQ(2U, [findDelegate matchesCount]); > EXPECT_EQ(0, [findDelegate matchIndex]); >@@ -311,7 +311,7 @@ TEST(WKPDFView, FindStringBackwardPastSt > > isDone = NO; > [webView _findString:expectedString options:_WKFindOptionsCaseInsensitive | _WKFindOptionsBackwards maxCount:maxCount]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > EXPECT_TRUE([findDelegate didFail]); > EXPECT_WK_STREQ(expectedString, [findDelegate findString]); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKPDFViewResizeCrash.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKPDFViewResizeCrash.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKPDFViewResizeCrash.mm (working copy) >@@ -48,6 +48,6 @@ TEST(WebKit, WKPDFViewResizeCrash) > finishedDispatch = true; > }); > >- TestWebKitAPI::Util::run(&finishedDispatch); >+ TestWebKitAPI::runUntil(finishedDispatch); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKPDFViewStablePresentationUpdateCallback.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKPDFViewStablePresentationUpdateCallback.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKPDFViewStablePresentationUpdateCallback.mm (working copy) >@@ -47,7 +47,7 @@ TEST(WebKit, WKPDFViewStablePresentation > finished = true; > }]; > >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm (working copy) >@@ -69,7 +69,7 @@ TEST(WebKit, RequestActivatedElementInfo > finished = true; > }]; > >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > } > > TEST(WebKit, RequestActivatedElementInfoForImage) >@@ -93,7 +93,7 @@ TEST(WebKit, RequestActivatedElementInfo > finished = true; > }]; > >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > } > > TEST(WebKit, RequestActivatedElementInfoForBlank) >@@ -112,7 +112,7 @@ TEST(WebKit, RequestActivatedElementInfo > finished = true; > }]; > >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > } > > TEST(WebKit, RequestActivatedElementInfoWithNestedSynchronousUpdates) >@@ -127,7 +127,7 @@ TEST(WebKit, RequestActivatedElementInfo > checkElementTypeAndBoundingRect(elementInfo, _WKActivatedElementTypeLink, CGRectMake(0, 0, 200, 200)); > finished = true; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > > finished = false; > [webView _requestActivatedElementAtPosition:CGPointMake(100, 100) completionBlock:^(_WKActivatedElementInfo *elementInfo) { >@@ -136,7 +136,7 @@ TEST(WebKit, RequestActivatedElementInfo > checkElementTypeAndBoundingRect(elementInfo, _WKActivatedElementTypeLink, CGRectMake(0, 0, 200, 200)); > finished = true; > }]; >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > } > > TEST(WebKit, RequestActivatedElementInfoWithNestedRequests) >@@ -154,8 +154,8 @@ TEST(WebKit, RequestActivatedElementInfo > checkElementTypeAndBoundingRect(outerElementInfo, _WKActivatedElementTypeImage, CGRectMake(0, 0, 200, 200)); > finishedWithOuter = true; > }]; >- TestWebKitAPI::Util::run(&finishedWithOuter); >- TestWebKitAPI::Util::run(&finishedWithInner); >+ TestWebKitAPI::runUntil(finishedWithOuter); >+ TestWebKitAPI::runUntil(finishedWithInner); > > finishedWithInner = false; > finishedWithOuter = false; >@@ -167,8 +167,8 @@ TEST(WebKit, RequestActivatedElementInfo > checkElementTypeAndBoundingRect(outerElementInfo, _WKActivatedElementTypeImage, CGRectMake(0, 0, 200, 200)); > finishedWithOuter = true; > }]; >- TestWebKitAPI::Util::run(&finishedWithOuter); >- TestWebKitAPI::Util::run(&finishedWithInner); >+ TestWebKitAPI::runUntil(finishedWithOuter); >+ TestWebKitAPI::runUntil(finishedWithInner); > } > > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm (working copy) >@@ -148,7 +148,7 @@ TEST(URLSchemeHandler, Basic) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"testing:main"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ([handler.get().startedURLs count], 2u); > EXPECT_TRUE([[handler.get().startedURLs objectAtIndex:0] isEqual:[NSURL URLWithString:@"testing:main"]]); >@@ -172,7 +172,7 @@ TEST(URLSchemeHandler, BasicWithAsyncPol > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"testing:main"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ([handler.get().startedURLs count], 2u); > EXPECT_TRUE([[handler.get().startedURLs objectAtIndex:0] isEqual:[NSURL URLWithString:@"testing:main"]]); >@@ -198,7 +198,7 @@ TEST(URLSchemeHandler, NoMIMEType) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"testing:main"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_EQ([handler.get().startedURLs count], 1u); > EXPECT_TRUE([[handler.get().startedURLs objectAtIndex:0] isEqual:[NSURL URLWithString:@"testing:main"]]); >@@ -312,7 +312,7 @@ TEST(URLSchemeHandler, Redirection) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"testing:///initial"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_TRUE(responsePolicyDecided); > EXPECT_STREQ(webView.get().URL.absoluteString.UTF8String, "testing:///redirected"); >@@ -394,7 +394,7 @@ static void checkCallSequence(Vector<Com > [configuration setURLSchemeHandler:handler.get() forURLScheme:@"testing"]; > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"testing:///initial"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST(URLSchemeHandler, Exceptions) >@@ -519,7 +519,7 @@ TEST(URLSchemeHandler, SyncXHR) > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"syncxhr://host/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&receivedMessage); >+ TestWebKitAPI::runUntil(receivedMessage); > receivedMessage = false; > > EXPECT_EQ((unsigned)receivedMessages.get().count, (unsigned)1); >@@ -530,13 +530,13 @@ TEST(URLSchemeHandler, SyncXHR) > handler.get()->resources.find("syncxhr://host/test.dat")->value.shouldRespond = false; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&startedXHR); >+ TestWebKitAPI::runUntil(startedXHR); > receivedMessage = false; > > webView = nil; > [pool drain]; > >- TestWebKitAPI::Util::run(&receivedStop); >+ TestWebKitAPI::runUntil(receivedStop); > } > > @interface SyncErrorScheme : NSObject <WKURLSchemeHandler, WKUIDelegate> >@@ -579,7 +579,7 @@ TEST(URLSchemeHandler, SyncXHRError) > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]); > [webView setUIDelegate:handler.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"syncerror:///main.html"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > static const char* xhrPostDocument = R"XHRPOSTRESOURCE(<html><head><script> >@@ -689,6 +689,6 @@ TEST(URLSchemeHandler, XHRPost) > }]; > > [webView loadHTMLString:[NSString stringWithUTF8String:xhrPostDocument] baseURL:[NSURL URLWithString:@"xhrpost://example/xhrtest"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCandidateTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCandidateTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCandidateTests.mm (working copy) >@@ -84,7 +84,7 @@ - (void)insertCandidatesAndWaitForRespon > { > _isDoneWaitingForCandidate = false; > [self _handleAcceptedCandidate:[[TestCandidate alloc] initWithReplacementString:replacementString inRange:range]]; >- TestWebKitAPI::Util::run(&_isDoneWaitingForCandidate); >+ TestWebKitAPI::runUntil(_isDoneWaitingForCandidate); > } > > - (void)_didHandleAcceptedCandidate >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm (working copy) >@@ -93,5 +93,5 @@ TEST(WebKit, DefaultConfigurationEME) > EXPECT_TRUE([result isEqualToString:@"ENABLED"]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm (working copy) >@@ -51,7 +51,7 @@ TEST(WKWebView, DefaultNavigationDelegat > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"notreal:/hello"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDiagnosticLogging.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDiagnosticLogging.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDiagnosticLogging.mm (working copy) >@@ -93,5 +93,5 @@ TEST(WKWebView, DiagnosticLoggingDiction > [webView configuration].preferences._diagnosticLoggingEnabled = YES; > > [webView loadHTMLString:@"<script>window.internals.testDictionaryLogging()</script>" baseURL:nil]; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm (working copy) >@@ -59,7 +59,7 @@ TEST(WKWebView, EvaluateJavaScriptBlockC > } > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WKWebView, EvaluateJavaScriptErrorCases) >@@ -79,7 +79,7 @@ TEST(WKWebView, EvaluateJavaScriptErrorC > }]; > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > [webView evaluateJavaScript:@"document.body.insertBefore(document, document)" completionHandler:^(id result, NSError *error) { > EXPECT_NULL(result); >@@ -94,7 +94,7 @@ TEST(WKWebView, EvaluateJavaScriptErrorC > }]; > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > [webView evaluateJavaScript:@"\n\nthrow 'something bad'" completionHandler:^(id result, NSError *error) { > EXPECT_NULL(result); >@@ -109,5 +109,5 @@ TEST(WKWebView, EvaluateJavaScriptErrorC > }]; > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm (working copy) >@@ -137,7 +137,7 @@ TEST(WKWebViewFindString, DoNotFocusMatc > EXPECT_FALSE(viewIsFirstResponder(firstWebView.get())); > > [firstWebView _findString:@"hello" options:0 maxCount:maxCount]; >- Util::run(&isDone); >+ runUntil(isDone); > > EXPECT_FALSE(viewIsFirstResponder(firstWebView.get())); > EXPECT_WK_STREQ("hello", [findDelegate findString]); >@@ -162,7 +162,7 @@ TEST(WKWebViewFindString, DoNotFocusMatc > EXPECT_FALSE([firstWebView isFirstResponder]); > > [firstWebView _findString:@"hello" options:0 maxCount:maxCount]; >- Util::run(&isDone); >+ runUntil(isDone); > > EXPECT_FALSE([firstWebView isFirstResponder]); > EXPECT_WK_STREQ("hello", [findDelegate findString]); >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFirstResponderTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFirstResponderTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFirstResponderTests.mm (working copy) >@@ -56,7 +56,7 @@ - (instancetype)initWithFrame:(CGRect)fr > _inputField = adoptNS([[UITextField alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(frame), 44)]); > [self.scrollView addSubview:_inputField.get()]; > [self synchronouslyLoadHTMLString:@"<body contenteditable><script>document.body.focus()</script>"]; >- TestWebKitAPI::Util::run(&doneFocusing); >+ TestWebKitAPI::runUntil(doneFocusing); > return self; > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm (working copy) >@@ -46,7 +46,7 @@ TEST(WKWebView, GetContentsShouldReturnS > finished = true; > }]; > >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > } > > TEST(WKWebView, GetContentsShouldReturnAttributedString) >@@ -95,5 +95,5 @@ TEST(WKWebView, GetContentsShouldReturnA > finished = true; > }]; > >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm (working copy) >@@ -79,7 +79,7 @@ TEST(WKWebView, SnapshotImageError) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WKWebView, SnapshotImageBaseCase) >@@ -143,7 +143,7 @@ TEST(WKWebView, SnapshotImageBaseCase) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WKWebView, SnapshotImageScale) >@@ -170,7 +170,7 @@ TEST(WKWebView, SnapshotImageScale) > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WKWebView, SnapshotImageNilConfiguration) >@@ -191,7 +191,7 @@ TEST(WKWebView, SnapshotImageNilConfigur > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WKWebView, SnapshotImageUninitializedConfiguration) >@@ -214,7 +214,7 @@ TEST(WKWebView, SnapshotImageUninitializ > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WKWebView, SnapshotImageUninitializedSnapshotWidth) >@@ -238,7 +238,7 @@ TEST(WKWebView, SnapshotImageUninitializ > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WKWebView, SnapshotImageLargeAsyncDecoding) >@@ -289,7 +289,7 @@ TEST(WKWebView, SnapshotImageLargeAsyncD > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WKWebView, SnapshotAfterScreenUpdates) >@@ -349,7 +349,7 @@ TEST(WKWebView, SnapshotAfterScreenUpdat > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > TEST(WKWebView, SnapshotWithoutAfterScreenUpdates) >@@ -410,5 +410,5 @@ TEST(WKWebView, SnapshotWithoutAfterScre > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm (working copy) >@@ -59,7 +59,7 @@ - (instancetype)init > > - (void)waitForDidFinishNavigation > { >- TestWebKitAPI::Util::run(&_hasFinishedNavigation); >+ TestWebKitAPI::runUntil(_hasFinishedNavigation); > } > > - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation >@@ -87,14 +87,14 @@ TEST(WKWebsiteDataStore, RemoveAndFetchD > [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate] modifiedSince:[NSDate distantPast] completionHandler:^() { > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > > readyToContinue = false; > [[WKWebsiteDataStore defaultDataStore] fetchDataRecordsOfTypes:[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate] completionHandler:^(NSArray<WKWebsiteDataRecord *> *dataRecords) { > ASSERT_EQ(0u, dataRecords.count); > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > } > > TEST(WKWebsiteDataStore, RemoveEphemeralData) >@@ -107,7 +107,7 @@ TEST(WKWebsiteDataStore, RemoveEphemeral > [[configuration websiteDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler: ^{ > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > static void respondWithChallengeThenOK(int socket) >@@ -159,7 +159,7 @@ TEST(WKWebsiteDataStore, FetchNonPersist > ASSERT_TRUE([[record displayName] isEqualToString:@"127.0.0.1"]); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST(WKWebsiteDataStore, FetchPersistentCredentials) >@@ -189,7 +189,7 @@ TEST(WKWebsiteDataStore, FetchPersistent > EXPECT_TRUE(foundExpectedRecord); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > __block bool removedCredential = false; > [websiteDataStore fetchDataRecordsOfTypes:[NSSet setWithObject:_WKWebsiteDataTypeCredentials] completionHandler:^(NSArray<WKWebsiteDataRecord *> *dataRecords) { >@@ -197,7 +197,7 @@ TEST(WKWebsiteDataStore, FetchPersistent > removedCredential = true; > }]; > }]; >- TestWebKitAPI::Util::run(&removedCredential); >+ TestWebKitAPI::runUntil(removedCredential); > } > > TEST(WKWebsiteDataStore, RemovePersistentCredentials) >@@ -227,13 +227,13 @@ TEST(WKWebsiteDataStore, RemovePersisten > EXPECT_TRUE(expectedRecord); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [websiteDataStore removeDataOfTypes:[NSSet setWithObject:_WKWebsiteDataTypeCredentials] forDataRecords:[NSArray arrayWithObject:expectedRecord.get()] completionHandler:^(void) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [websiteDataStore fetchDataRecordsOfTypes:[NSSet setWithObject:_WKWebsiteDataTypeCredentials] completionHandler:^(NSArray<WKWebsiteDataRecord *> *dataRecords) { >@@ -248,7 +248,7 @@ TEST(WKWebsiteDataStore, RemovePersisten > EXPECT_FALSE(foundLocalHostRecord); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST(WKWebsiteDataStore, RemoveNonPersistentCredentials) >@@ -280,13 +280,13 @@ TEST(WKWebsiteDataStore, RemoveNonPersis > EXPECT_TRUE(expectedRecord); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [websiteDataStore removeDataOfTypes:[NSSet setWithObject:_WKWebsiteDataTypeCredentials] forDataRecords:[NSArray arrayWithObject:expectedRecord.get()] completionHandler:^(void) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [websiteDataStore fetchDataRecordsOfTypes:[NSSet setWithObject:_WKWebsiteDataTypeCredentials] completionHandler:^(NSArray<WKWebsiteDataRecord *> *dataRecords) { >@@ -301,7 +301,7 @@ TEST(WKWebsiteDataStore, RemoveNonPersis > EXPECT_FALSE(foundLocalHostRecord); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm (working copy) >@@ -118,7 +118,7 @@ TEST(WKNavigation, FailureToStartWebProc > shouldLoadAgainOnCrash = true; > > [webView loadHTMLString:testHTML baseURL:nil]; >- TestWebKitAPI::Util::run(&finishedLoad); >+ TestWebKitAPI::runUntil(finishedLoad); > > EXPECT_TRUE(didCrash); > EXPECT_TRUE(!!webView.get()._webProcessIdentifier); >@@ -141,7 +141,7 @@ TEST(WKNavigation, FailureToStartWebProc > didCrash = false; > > [webView loadHTMLString:testHTML baseURL:nil]; >- TestWebKitAPI::Util::run(&finishedLoad); >+ TestWebKitAPI::runUntil(finishedLoad); > > EXPECT_FALSE(didCrash); > EXPECT_TRUE(!!webView.get()._webProcessIdentifier); >@@ -152,7 +152,7 @@ TEST(WKNavigation, FailureToStartWebProc > expectedCrashReason = _WKProcessTerminationReasonRequestedByClient; > [webView _killWebContentProcessAndResetState]; > >- TestWebKitAPI::Util::run(&didCrash); >+ TestWebKitAPI::runUntil(didCrash); > EXPECT_TRUE(!webView.get()._webProcessIdentifier); > EXPECT_FALSE(receivedScriptMessage); > >@@ -165,7 +165,7 @@ TEST(WKNavigation, FailureToStartWebProc > [configuration.get().processPool _makeNextWebProcessLaunchFailForTesting]; > [webView loadHTMLString:testHTML baseURL:nil]; > >- TestWebKitAPI::Util::run(&finishedLoad); >+ TestWebKitAPI::runUntil(finishedLoad); > > EXPECT_TRUE(didCrash); > EXPECT_TRUE(!!webView.get()._webProcessIdentifier); >@@ -183,7 +183,7 @@ TEST(WKNavigation, AutomaticViewReloadAf > finishedLoad = false; > > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"rich-and-plain-text" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- TestWebKitAPI::Util::run(&finishedLoad); >+ TestWebKitAPI::runUntil(finishedLoad); > > startedLoad = false; > finishedLoad = false; >@@ -192,7 +192,7 @@ TEST(WKNavigation, AutomaticViewReloadAf > [webView _killWebContentProcess]; > > // Since we do not deal with the crash, WebKit should attempt a reload. >- TestWebKitAPI::Util::run(&finishedLoad); >+ TestWebKitAPI::runUntil(finishedLoad); > > startedLoad = false; > finishedLoad = false; >@@ -217,7 +217,7 @@ TEST(WKNavigation, ProcessCrashDuringCal > finishedLoad = false; > > [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"rich-and-plain-text" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- TestWebKitAPI::Util::run(&finishedLoad); >+ TestWebKitAPI::runUntil(finishedLoad); > > startedLoad = false; > finishedLoad = false; >@@ -273,7 +273,7 @@ TEST(WKNavigation, ProcessCrashDuringCal > // Simulate a crash, which should invalidate all pending callbacks. > [webView _killWebContentProcess]; > >- TestWebKitAPI::Util::run(&calledAllCallbacks); >+ TestWebKitAPI::runUntil(calledAllCallbacks); > TestWebKitAPI::Util::sleep(0.5); > EXPECT_EQ(6U, callbackCount); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WebCryptoMasterKey.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WebCryptoMasterKey.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WebCryptoMasterKey.mm (working copy) >@@ -64,7 +64,7 @@ TEST(WebKit, WebCryptoNilMasterKey) > [webView setUIDelegate:delegate.get()]; > > [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]]; >- Util::run(&receivedMessage); >+ runUntil(receivedMessage); > EXPECT_WK_STREQ("DataCloneError", gMessage); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm (working copy) >@@ -112,7 +112,7 @@ static void runTest(_WKWebGLLoadPolicy f > [webView setNavigationDelegate:delegate.get()]; > [webView setUIDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:htmlURL.get()]]; >- TestWebKitAPI::Util::run(&testComplete); >+ TestWebKitAPI::runUntil(testComplete); > } > > TEST(WebKit, WebGLPolicy) >@@ -161,7 +161,7 @@ TEST(WebKit, WebGLPolicyNoDelegate) > auto webView = adoptNS([[WKWebView alloc] init]); > [webView setUIDelegate:delegate.get()]; > [webView loadHTMLString:data baseURL:[NSURL URLWithString:@"http://example.com/"]]; >- TestWebKitAPI::Util::run(&testComplete); >+ TestWebKitAPI::runUntil(testComplete); > EXPECT_STREQ([alert UTF8String], "doing stuff with webgl context succeeded"); > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm (working copy) >@@ -58,7 +58,7 @@ static WKScriptMessage *getNextMessage() > { > if (scriptMessages.isEmpty()) { > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > } > > return [[scriptMessages.takeFirst() retain] autorelease]; >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm (working copy) >@@ -67,7 +67,7 @@ static WKScriptMessage *getNextMessage() > { > if (scriptMessages.isEmpty()) { > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > } > > return [[scriptMessages.takeFirst() retain] autorelease]; >@@ -221,13 +221,13 @@ static void runWebsiteDataStoreCustomPat > } > }]; > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > > [dataStore removeDataOfTypes:types.get() modifiedSince:[NSDate distantPast] completionHandler:[]() { > receivedScriptMessage = true; > }]; > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > > EXPECT_FALSE([[NSFileManager defaultManager] fileExistsAtPath:fileIDBPath.get().path]); > >@@ -243,7 +243,7 @@ static void runWebsiteDataStoreCustomPat > }]; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > > [processPool _terminateNetworkProcess]; > newCustomDataStore = adoptNS([[WKWebsiteDataStore alloc] _initWithConfiguration:websiteDataStoreConfiguration.get()]); >@@ -253,7 +253,7 @@ static void runWebsiteDataStoreCustomPat > }]; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > > // This time, reuse the same network process but still do a new websitedatastore, to make sure even an existing network process > // gets the new datastore. >@@ -265,7 +265,7 @@ static void runWebsiteDataStoreCustomPat > }]; > > receivedScriptMessage = false; >- TestWebKitAPI::Util::run(&receivedScriptMessage); >+ TestWebKitAPI::runUntil(receivedScriptMessage); > > EXPECT_FALSE([WKWebsiteDataStore _defaultDataStoreExists]); > } >@@ -303,7 +303,7 @@ TEST(WebKit, CustomDataStorePathsVersusC > EXPECT_EQ(1U, dataRecords.count); > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > readyToContinue = false; > > // Fetch records again, this time releasing our reference to the data store while the request is in flight. >@@ -312,7 +312,7 @@ TEST(WebKit, CustomDataStorePathsVersusC > readyToContinue = true; > }]; > dataStore = nil; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > readyToContinue = false; > > // Delete all SW records, releasing our reference to the data store while the request is in flight. >@@ -321,7 +321,7 @@ TEST(WebKit, CustomDataStorePathsVersusC > readyToContinue = true; > }]; > dataStore = nil; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > readyToContinue = false; > > // The records should have been deleted, and the callback should have been made. >@@ -331,7 +331,7 @@ TEST(WebKit, CustomDataStorePathsVersusC > EXPECT_EQ(0U, dataRecords.count); > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > } > > TEST(WebKit, CustomDataStoreDestroyWhileFetchingNetworkProcessData) >@@ -353,7 +353,7 @@ TEST(WebKit, CustomDataStoreDestroyWhile > EXPECT_EQ((int)dataRecords.count, 0); > readyToContinue = true; > }]; >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > readyToContinue = false; > > // Fetch records again, this time releasing our reference to the data store while the request is in flight. >@@ -363,7 +363,7 @@ TEST(WebKit, CustomDataStoreDestroyWhile > }]; > dataStore = nil; > } >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > readyToContinue = false; > > @autoreleasepool { >@@ -384,7 +384,7 @@ TEST(WebKit, CustomDataStoreDestroyWhile > dataStore = nil; > } > >- TestWebKitAPI::Util::run(&readyToContinue); >+ TestWebKitAPI::runUntil(readyToContinue); > readyToContinue = false; > } > >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm (working copy) >@@ -149,7 +149,7 @@ TEST(WebKit, WebsitePoliciesContentBlock > [[configuration userContentController] _addUserContentFilter:filter]; > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > >@@ -161,15 +161,15 @@ TEST(WebKit, WebsitePoliciesContentBlock > alertCount = 0; > receivedAlert = false; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > > receivedAlert = false; > [webView reload]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > > receivedAlert = false; > [webView _reloadWithoutContentBlockers]; >- TestWebKitAPI::Util::run(&receivedAlert); >+ TestWebKitAPI::runUntil(receivedAlert); > > [[_WKUserContentExtensionStore defaultStore] _removeAllContentExtensions]; > } >@@ -572,7 +572,7 @@ TEST(WebKit, WebsitePoliciesWithUnexpect > > [webView setNavigationDelegate:delegate.get()]; > [webView loadTestPageNamed:@"simple"]; >- TestWebKitAPI::Util::run(&didCatchException); >+ TestWebKitAPI::runUntil(didCatchException); > } > > struct ParsedRange { >@@ -1063,16 +1063,16 @@ TEST(WebKit, CustomHeaderFields) > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > [webView setNavigationDelegate:delegate.get()]; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"test:///mainresource"]]]; >- TestWebKitAPI::Util::run(&firstTestDone); >+ TestWebKitAPI::runUntil(firstTestDone); > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"test://mainframeorigin/mainresourcewithiframe"]]]; >- TestWebKitAPI::Util::run(&secondTestDone); >+ TestWebKitAPI::runUntil(secondTestDone); > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"test://toporigin/nestedtop"]]]; >- TestWebKitAPI::Util::run(&thirdTestDone); >+ TestWebKitAPI::runUntil(thirdTestDone); > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"test://host/testcustomheaderfieldhosts"]]]; >- TestWebKitAPI::Util::run(&fifthTestDone); >+ TestWebKitAPI::runUntil(fifthTestDone); > } > > static unsigned loadCount; >@@ -1194,7 +1194,7 @@ TEST(WebKit, WebsitePoliciesCustomUserAg > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"test://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > while (loadCount != 9U) >@@ -1204,7 +1204,7 @@ TEST(WebKit, WebsitePoliciesCustomUserAg > request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"test://www.google.com/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > EXPECT_EQ(1U, loadCount); >@@ -1260,7 +1260,7 @@ TEST(WebKit, WebsitePoliciesCustomJavaSc > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"test://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > while (loadCount != 9U) >@@ -1293,7 +1293,7 @@ TEST(WebKit, WebsitePoliciesCustomUserAg > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"test://www.webkit.org/main.html"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > while (loadCount != 9U) >@@ -1337,7 +1337,7 @@ TEST(WebKit, WebsitePoliciesCustomNaviga > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"data:text/html,hello"]]; > [webView loadRequest:request]; > >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > EXPECT_STREQ("Test Custom Platform", [[webView stringByEvaluatingJavaScript:@"navigator.platform"] UTF8String]); >@@ -1416,14 +1416,14 @@ static void runWebsitePoliciesDeviceOrie > > NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"test://localhost/main.html"]]; > [webView loadRequest:request]; >- TestWebKitAPI::Util::run(&finishedNavigation); >+ TestWebKitAPI::runUntil(finishedNavigation); > finishedNavigation = false; > > bool askedForPermission = false; > [webView evaluateJavaScript:@"DeviceOrientationEvent.requestPermission()" completionHandler: [&] (id result, NSError *error) { > askedForPermission = true; > }]; >- TestWebKitAPI::Util::run(&askedForPermission); >+ TestWebKitAPI::runUntil(askedForPermission); > > __block bool didReceiveMessage = false; > [webView performAfterReceivingMessage:@"received-device-orientation-event" action:^{ >@@ -1438,7 +1438,7 @@ static void runWebsitePoliciesDeviceOrie > EXPECT_FALSE(calledShouldAllowDeviceOrientationAndMotionAccessDelegate); > > if (accessPolicy != _WKWebsiteDeviceOrientationAndMotionAccessPolicyDeny) >- TestWebKitAPI::Util::run(&didReceiveMessage); >+ TestWebKitAPI::runUntil(didReceiveMessage); > else { > TestWebKitAPI::Util::sleep(0.1); > EXPECT_FALSE(didReceiveMessage); >@@ -1614,11 +1614,11 @@ TEST(WebKit, UpdateWebsitePoliciesInvali > EXPECT_TRUE(sawException); > > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"test:///invalid"]]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > done = false; > [webView loadHTMLString:@"<iframe src='subFrame'></iframe>" baseURL:[NSURL URLWithString:@"http://webkit.org/mainFrame"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST(WebKit, WebsitePoliciesDataStore) >@@ -1626,13 +1626,13 @@ TEST(WebKit, WebsitePoliciesDataStore) > auto cookieWebView = websiteDataStoreTestWebView(); > NSString *alertOldCookie = @"<script>var oldCookie = document.cookie; document.cookie = 'key=value'; alert('old value: <' + oldCookie + '>');</script>"; > [cookieWebView loadHTMLString:alertOldCookie baseURL:[NSURL URLWithString:@"http://example.com/checkCookies"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > done = false; > > auto pid1 = [cookieWebView _webProcessIdentifier]; > > [cookieWebView loadHTMLString:alertOldCookie baseURL:[NSURL URLWithString:@"http://example.com/checkCookies"]]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_NE(pid1, [cookieWebView _webProcessIdentifier]); > } >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm (working copy) >@@ -100,7 +100,7 @@ TEST(WebKit, FormSubmission) > "<input type='password' name='testname2' value='testvalue2'/>" > "<input type='hidden' name='testname3' value='testvalue3'/>" > "</form></body>" baseURL:nil]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > #if PLATFORM(IOS_FAMILY) >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKUserContentExtensionStore.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKUserContentExtensionStore.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKUserContentExtensionStore.mm (working copy) >@@ -51,7 +51,7 @@ TEST_F(_WKUserContentExtensionStoreTest, > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > } > > static NSString *invalidFilter = @"["; >@@ -74,7 +74,7 @@ TEST_F(_WKUserContentExtensionStoreTest, > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > } > > TEST_F(_WKUserContentExtensionStoreTest, Lookup) >@@ -87,7 +87,7 @@ TEST_F(_WKUserContentExtensionStoreTest, > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > __block bool doneLookingUp = false; > [[_WKUserContentExtensionStore defaultStore] lookupContentExtensionForIdentifier:@"TestExtension" completionHandler:^(_WKUserContentFilter *filter, NSError *error) { >@@ -97,7 +97,7 @@ TEST_F(_WKUserContentExtensionStoreTest, > > doneLookingUp = true; > }]; >- TestWebKitAPI::Util::run(&doneLookingUp); >+ TestWebKitAPI::runUntil(doneLookingUp); > } > > TEST_F(_WKUserContentExtensionStoreTest, NonExistingIdentifierLookup) >@@ -113,7 +113,7 @@ TEST_F(_WKUserContentExtensionStoreTest, > > doneLookingUp = true; > }]; >- TestWebKitAPI::Util::run(&doneLookingUp); >+ TestWebKitAPI::runUntil(doneLookingUp); > } > > TEST_F(_WKUserContentExtensionStoreTest, VersionMismatch) >@@ -127,7 +127,7 @@ TEST_F(_WKUserContentExtensionStoreTest, > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > [[_WKUserContentExtensionStore defaultStore] _invalidateContentExtensionVersionForIdentifier:@"TestExtension"]; > >@@ -143,7 +143,7 @@ TEST_F(_WKUserContentExtensionStoreTest, > > doneLookingUp = true; > }]; >- TestWebKitAPI::Util::run(&doneLookingUp); >+ TestWebKitAPI::runUntil(doneLookingUp); > } > > TEST_F(_WKUserContentExtensionStoreTest, Removal) >@@ -156,7 +156,7 @@ TEST_F(_WKUserContentExtensionStoreTest, > > doneCompiling = true; > }]; >- TestWebKitAPI::Util::run(&doneCompiling); >+ TestWebKitAPI::runUntil(doneCompiling); > > __block bool doneRemoving = false; > [[_WKUserContentExtensionStore defaultStore] removeContentExtensionForIdentifier:@"TestExtension" completionHandler:^(NSError *error) { >@@ -164,7 +164,7 @@ TEST_F(_WKUserContentExtensionStoreTest, > > doneRemoving = true; > }]; >- TestWebKitAPI::Util::run(&doneRemoving); >+ TestWebKitAPI::runUntil(doneRemoving); > } > > TEST_F(_WKUserContentExtensionStoreTest, NonExistingIdentifierRemove) >@@ -178,5 +178,5 @@ TEST_F(_WKUserContentExtensionStoreTest, > > doneRemoving = true; > }]; >- TestWebKitAPI::Util::run(&doneRemoving); >+ TestWebKitAPI::runUntil(doneRemoving); > } >Index: Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm (working copy) >@@ -97,7 +97,7 @@ TEST(WebKitLegacy, AudioSessionCategoryI > > [uiWebView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"video-with-audio" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didBeginPlaying); >+ runUntil(didBeginPlaying); > > waitUntilAudioSessionCategoryIsEqualTo(getAVAudioSessionCategoryPlayback()); > EXPECT_WK_STREQ(getAVAudioSessionCategoryPlayback(), [[getAVAudioSessionClass() sharedInstance] category]); >@@ -110,7 +110,7 @@ TEST(WebKitLegacy, AudioSessionCategoryI > > [uiWebView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"video-without-audio" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didBeginPlaying); >+ runUntil(didBeginPlaying); > > waitUntilAudioSessionCategoryIsEqualTo(getAVAudioSessionCategoryAmbient()); > EXPECT_WK_STREQ(getAVAudioSessionCategoryAmbient(), [[getAVAudioSessionClass() sharedInstance] category]); >@@ -120,7 +120,7 @@ TEST(WebKitLegacy, AudioSessionCategoryI > > [uiWebView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"video-with-muted-audio" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didBeginPlaying); >+ runUntil(didBeginPlaying); > > waitUntilAudioSessionCategoryIsEqualTo(getAVAudioSessionCategoryAmbient()); > EXPECT_WK_STREQ(getAVAudioSessionCategoryAmbient(), [[getAVAudioSessionClass() sharedInstance] category]); >@@ -130,7 +130,7 @@ TEST(WebKitLegacy, AudioSessionCategoryI > > [uiWebView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"video-with-muted-audio-and-webaudio" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didBeginPlaying); >+ runUntil(didBeginPlaying); > > waitUntilAudioSessionCategoryIsEqualTo(getAVAudioSessionCategoryAmbient()); > EXPECT_WK_STREQ(getAVAudioSessionCategoryAmbient(), [[getAVAudioSessionClass() sharedInstance] category]); >@@ -140,7 +140,7 @@ TEST(WebKitLegacy, AudioSessionCategoryI > > [uiWebView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"video-with-paused-audio-and-playing-muted" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didBeginPlaying); >+ runUntil(didBeginPlaying); > > waitUntilAudioSessionCategoryIsEqualTo(getAVAudioSessionCategoryPlayback()); > EXPECT_WK_STREQ(getAVAudioSessionCategoryPlayback(), [[getAVAudioSessionClass() sharedInstance] category]); >@@ -153,7 +153,7 @@ TEST(WebKitLegacy, AudioSessionCategoryI > > [uiWebView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"audio-only" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didBeginPlaying); >+ runUntil(didBeginPlaying); > > waitUntilAudioSessionCategoryIsEqualTo(getAVAudioSessionCategoryPlayback()); > EXPECT_WK_STREQ(getAVAudioSessionCategoryPlayback(), [[getAVAudioSessionClass() sharedInstance] category]); >Index: Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm (working copy) >@@ -88,8 +88,8 @@ TEST(WebKitLegacy, ScrollingDoesNotPause > > [uiWebView loadRequest:[NSURLRequest requestWithURL:[NSBundle.mainBundle URLForResource:@"video-with-audio" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >- Util::run(&gotMainFrame); >+ runUntil(didFinishLoad); >+ runUntil(gotMainFrame); > > callOnMainThreadAndWait([&] () mutable { > DOMHTMLMediaElement* video = (DOMHTMLMediaElement*)[mainFrame.DOMDocument querySelector:@"video"]; >@@ -102,7 +102,7 @@ TEST(WebKitLegacy, ScrollingDoesNotPause > [video play]; > }); > >- Util::run(&didReceivePlaying); >+ runUntil(didReceivePlaying); > > callOnMainThreadAndWait([&] () mutable { > DOMHTMLMediaElement* video = (DOMHTMLMediaElement*)[mainFrame.DOMDocument querySelector:@"video"]; >@@ -115,7 +115,7 @@ TEST(WebKitLegacy, ScrollingDoesNotPause > [video pause]; > }); > >- Util::run(&didReceivePause); >+ runUntil(didReceivePause); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/SnapshotViaRenderInContext.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/SnapshotViaRenderInContext.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/SnapshotViaRenderInContext.mm (working copy) >@@ -80,7 +80,7 @@ TEST(WebKitLegacy, RenderInContextSnapsh > NSLog(@"Loading %@", url); > [uiWebView loadRequest:[NSURLRequest requestWithURL:url]]; > >- Util::run(&loadComplete); >+ runUntil(loadComplete); > > EXPECT_TRUE(loadComplete); > EXPECT_FALSE(loadFailed); >Index: Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm (working copy) >@@ -89,7 +89,7 @@ TEST(WebKitLegacy, AccessingImageInPaste > > auto *mainFrame = webView.get().mainFrame; > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"paste-rtfd" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > [webView.get() setEditable:YES]; > > auto *pngData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"sunset-in-cupertino-200px" ofType:@"png" inDirectory:@"TestWebKitAPI.resources"]]; >@@ -99,7 +99,7 @@ TEST(WebKitLegacy, AccessingImageInPaste > > writeRTFDToPasteboard(RTFDData); > [webView paste:nil]; >- Util::run(&didAlert); >+ runUntil(didAlert); > > DOMDocument *document = [mainFrame DOMDocument]; > DOMElement *documentElement = document.documentElement; >@@ -126,19 +126,19 @@ TEST(WebKitLegacy, AccessingImageInPaste > [destinationWebView.get() setUIDelegate:delegate.get()]; > > [[sourceWebView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"image-and-contenteditable" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > [sourceWebView.get() setEditable:YES]; > > didFinishLoad = false; > [[destinationWebView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"paste-rtfd" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > [destinationWebView.get() setEditable:YES]; > > [sourceWebView stringByEvaluatingJavaScriptFromString:@"document.body.focus(); document.execCommand('selectAll');"]; > [sourceWebView copy:nil]; > > [destinationWebView paste:nil]; >- Util::run(&didAlert); >+ runUntil(didAlert); > > auto *mainFrame = destinationWebView.get().mainFrame; > DOMDocument *document = [mainFrame DOMDocument]; >Index: Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/ClosingWebView.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/ClosingWebView.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/ClosingWebView.mm (working copy) >@@ -76,7 +76,7 @@ TEST(WebKitLegacy, ClosingWebViewThenSen > > [[webView mainFrame] loadHTMLString:@"<html><body contenteditable><script>function addKeyPressHandler() { document.body.addEventListener('keypress', function(event) { event.preventDefault(); }, true) }; document.body.focus();</script></body></html>" baseURL:nil]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > // First, add a native event listener that closes the WebView. > [[[webView mainFrameDocument] body] addEventListener:@"keypress" listener:[[KeyboardEventListener alloc] init] useCapture:NO]; >Index: Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/DeallocWebViewInEventListener.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/DeallocWebViewInEventListener.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/DeallocWebViewInEventListener.mm (working copy) >@@ -77,7 +77,7 @@ TEST(WebKitLegacy, DeallocWebViewInEvent > webView.get().frameLoadDelegate = loadDelegate.get(); > > [[webView mainFrame] loadHTMLString:@"<html><body></body></html>" baseURL:nil]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > auto listener = adoptNS([[DeallocWebViewInEventListener alloc] init]); > [[[webView mainFrameDocument] body] addEventListener:@"keypress" listener:listener.get() useCapture:NO]; >@@ -86,7 +86,7 @@ TEST(WebKitLegacy, DeallocWebViewInEvent > [webView close]; > [pool drain]; > } >- Util::run(&didClose); >+ runUntil(didClose); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/DownloadThread.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/DownloadThread.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/DownloadThread.mm (working copy) >@@ -84,7 +84,7 @@ TEST(WebKitLegacy, DownloadThread) > [webView setDownloadDelegate:delegate.get()]; > > [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&done); >+ runUntil(done); > > EXPECT_TRUE([[NSFileManager defaultManager] fileExistsAtPath:destination.get()]); > [[NSFileManager defaultManager] removeItemAtPath:destination.get() error:nil]; >Index: Tools/TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsInvalidScheme.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsInvalidScheme.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsInvalidScheme.mm (working copy) >@@ -63,7 +63,7 @@ TEST(WebKit2CustomProtocolsTest, LoadInv > webView.platformView().browsingContextController.loadDelegate = [[LoadInvalidSchemeDelegate alloc] init]; > [webView.platformView().browsingContextController loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"ht'tp://www.webkit.org"]]]; > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsTest.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsTest.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsTest.mm (working copy) >@@ -147,7 +147,7 @@ static void runTest() > [wkView browsingContextController].loadDelegate = loadDelegate.get(); > [[wkView browsingContextController] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@://redirect?test", [TestProtocol scheme]]]]]; > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > TEST(WebKit2CustomProtocolsTest, MainResource) >@@ -175,7 +175,7 @@ TEST(WebKit2CustomProtocolsTest, Process > > [[wkView browsingContextController] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"custom:///test"]]]; > >- Util::run(&isDone); >+ runUntil(isDone); > isDone = false; > > // Instead of relying on the block going out of scope, manually release these objects in this order >@@ -189,7 +189,7 @@ TEST(WebKit2CustomProtocolsTest, Process > > // isDone might already be true if the protocol has already been told to stopLoading. > if (!isDone) >- Util::run(&isDone); >+ runUntil(isDone); > > // To crash reliably we need to spin the runloop a few times after the custom protocol has completed. > Util::spinRunLoop(10); >Index: Tools/TestWebKitAPI/Tests/WebKitObjC/PreventImageLoadWithAutoResizing.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitObjC/PreventImageLoadWithAutoResizing.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitObjC/PreventImageLoadWithAutoResizing.mm (working copy) >@@ -49,7 +49,7 @@ TEST(WebKit, PreventImageLoadWithAutoRes > }]; > [webView.platformView().browsingContextController loadHTMLString:@"<html><body style='background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFZJREFUeF59z4EJADEIQ1F36k7u5E7ZKXeUQPACJ3wK7UNokVxVk9kHnQH7bY9hbDyDhNXgjpRLqFlo4M2GgfyJHhjq8V4agfrgPQX3JtJQGbofmCHgA/nAKks+JAjFAAAAAElFTkSuQmCC);'></body></html>" baseURL:[NSURL URLWithString:@"about:blank"]]; > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm (working copy) >@@ -135,7 +135,7 @@ TEST_F(WebKit2UserContentTest, AddUserSt > > [wkView.browsingContextController loadHTMLString:htmlString baseURL:nil]; > >- TestWebKitAPI::Util::run(&testFinished); >+ TestWebKitAPI::runUntil(testFinished); > } > > TEST_F(WebKit2UserContentTest, AddUserStyleSheetAfterCreatingView) >@@ -156,7 +156,7 @@ TEST_F(WebKit2UserContentTest, AddUserSt > > [wkView.browsingContextController loadHTMLString:htmlString baseURL:nil]; > >- TestWebKitAPI::Util::run(&testFinished); >+ TestWebKitAPI::runUntil(testFinished); > } > > TEST_F(WebKit2UserContentTest, RemoveAllUserStyleSheets) >@@ -178,7 +178,7 @@ TEST_F(WebKit2UserContentTest, RemoveAll > > [wkView.browsingContextController loadHTMLString:htmlString baseURL:nil]; > >- TestWebKitAPI::Util::run(&testFinished); >+ TestWebKitAPI::runUntil(testFinished); > } > > TEST_F(WebKit2UserContentTest, AddUserScriptBeforeCreatingView) >@@ -198,7 +198,7 @@ TEST_F(WebKit2UserContentTest, AddUserSc > > [wkView.browsingContextController loadHTMLString:@"" baseURL:nil]; > >- TestWebKitAPI::Util::run(&testFinished); >+ TestWebKitAPI::runUntil(testFinished); > } > > TEST_F(WebKit2UserContentTest, AddUserScriptAfterCreatingView) >@@ -219,7 +219,7 @@ TEST_F(WebKit2UserContentTest, AddUserSc > > [wkView.browsingContextController loadHTMLString:@"" baseURL:nil]; > >- TestWebKitAPI::Util::run(&testFinished); >+ TestWebKitAPI::runUntil(testFinished); > } > > TEST_F(WebKit2UserContentTest, RemoveAllUserScripts) >@@ -241,7 +241,7 @@ TEST_F(WebKit2UserContentTest, RemoveAll > > [wkView.browsingContextController loadHTMLString:htmlString baseURL:nil]; > >- TestWebKitAPI::Util::run(&testFinished); >+ TestWebKitAPI::runUntil(testFinished); > } > > #endif >Index: Tools/TestWebKitAPI/Tests/WebKitObjC/WKBrowsingContextLoadDelegateTest.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitObjC/WKBrowsingContextLoadDelegateTest.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/WebKitObjC/WKBrowsingContextLoadDelegateTest.mm (working copy) >@@ -115,7 +115,7 @@ TEST_F(WKBrowsingContextLoadDelegateTest > [view.browsingContextController loadFileURL:nsURL restrictToFilesWithin:nil]; > > // Wait for the load to finish. >- TestWebKitAPI::Util::run(&simpleLoadDone); >+ TestWebKitAPI::runUntil(simpleLoadDone); > > // Tear down the delegate. > view.browsingContextController.loadDelegate = nil; >@@ -134,7 +134,7 @@ TEST_F(WKBrowsingContextLoadDelegateTest > [view.browsingContextController loadHTMLString:@"<html><body>Simple HTML String</body></html>" baseURL:[NSURL URLWithString:@"about:blank"]]; > > // Wait for the load to finish. >- TestWebKitAPI::Util::run(&simpleLoadDone); >+ TestWebKitAPI::runUntil(simpleLoadDone); > > // Tear down the delegate. > view.browsingContextController.loadDelegate = nil; >@@ -153,7 +153,7 @@ TEST_F(WKBrowsingContextLoadDelegateTest > [view.browsingContextController loadHTMLString:@"<html><body>Simple HTML String</body></html>" baseURL:nil]; > > // Wait for the load to finish. >- TestWebKitAPI::Util::run(&simpleLoadDone); >+ TestWebKitAPI::runUntil(simpleLoadDone); > > // Tear down the delegate. > view.browsingContextController.loadDelegate = nil; >@@ -172,7 +172,7 @@ TEST_F(WKBrowsingContextLoadDelegateTest > [view.browsingContextController loadHTMLString:nil baseURL:nil]; > > // Wait for the load to finish. >- TestWebKitAPI::Util::run(&simpleLoadDone); >+ TestWebKitAPI::runUntil(simpleLoadDone); > > // Tear down the delegate. > view.browsingContextController.loadDelegate = nil; >@@ -223,7 +223,7 @@ TEST_F(WKBrowsingContextLoadDelegateTest > [view.browsingContextController loadFileURL:nsURL restrictToFilesWithin:nil]; > > // Wait for the load to fail. >- TestWebKitAPI::Util::run(&simpleLoadFailDone); >+ TestWebKitAPI::runUntil(simpleLoadFailDone); > > // Tear down the delegate. > view.browsingContextController.loadDelegate = nil; >Index: Tools/TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm (working copy) >@@ -40,7 +40,7 @@ - (NSArray<NSValue *> *)rectsAtSelection > selectionRects = rects; > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > return selectionRects.autorelease(); > } > @end >Index: Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm (working copy) >@@ -122,7 +122,7 @@ TEST(ActionSheetTests, DISABLED_Dismissi > }]; > > [webView _simulateLongPressActionAtLocation:CGPointMake(100, 100)]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_FALSE(didDismissWebViewController); > EXPECT_NULL([webViewController presentedViewController]); >@@ -147,7 +147,7 @@ TEST(ActionSheetTests, ImageMapDoesNotDe > return actions; > }]; > [webView _simulateLongPressActionAtLocation:CGPointMake(200, 200)]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_WK_STREQ("Hello world", [webView stringByEvaluatingJavaScript:@"getSelection().toString()"]); > } >@@ -177,7 +177,7 @@ TEST(ActionSheetTests, DataDetectorsLink > return @[ ]; > }]; > [webView _simulateLongPressActionAtLocation:CGPointMake(5, 5)]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > return succeeded; > }; >@@ -211,7 +211,7 @@ static void presentActionSheetAndChooseA > return @[ copyAction.get() ]; > }]; > [webView _simulateLongPressActionAtLocation:location]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > EXPECT_TRUE(!!copyAction); > EXPECT_TRUE(!!copyElement); >@@ -246,7 +246,7 @@ TEST(ActionSheetTests, CopyImageElementW > EXPECT_WK_STREQ((__bridge NSString *)kUTTypeURL, [itemProvider registeredTypeIdentifiers].lastObject); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > __block bool doneLoading = false; > [itemProvider loadObjectOfClass:[NSURL class] completionHandler:^(id <NSItemProviderReading> result, NSError *) { >@@ -256,7 +256,7 @@ TEST(ActionSheetTests, CopyImageElementW > EXPECT_WK_STREQ("hello world", url._title); > doneLoading = true; > }]; >- TestWebKitAPI::Util::run(&doneLoading); >+ TestWebKitAPI::runUntil(doneLoading); > } > > TEST(ActionSheetTests, CopyImageElementWithHREF) >@@ -286,7 +286,7 @@ TEST(ActionSheetTests, CopyImageElementW > EXPECT_WK_STREQ((__bridge NSString *)kUTTypeURL, [itemProvider registeredTypeIdentifiers].lastObject); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > __block bool doneLoading = false; > [itemProvider loadObjectOfClass:[NSURL class] completionHandler:^(id <NSItemProviderReading> result, NSError *) { >@@ -296,7 +296,7 @@ TEST(ActionSheetTests, CopyImageElementW > EXPECT_WK_STREQ("https://www.apple.com/", url._title); > doneLoading = true; > }]; >- TestWebKitAPI::Util::run(&doneLoading); >+ TestWebKitAPI::runUntil(doneLoading); > } > > TEST(ActionSheetTests, CopyImageElementWithoutHREF) >@@ -323,7 +323,7 @@ TEST(ActionSheetTests, CopyImageElementW > EXPECT_WK_STREQ((__bridge NSString *)kUTTypePNG, itemProvider.registeredTypeIdentifiers.firstObject); > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST(ActionSheetTests, CopyLinkWritesURLAndPlainText) >Index: Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm (working copy) >@@ -562,7 +562,7 @@ TEST(DragAndDropTests, LinkToInput) > EXPECT_WK_STREQ("Hello world", url._title.UTF8String ?: ""); > doneLoadingURL = true; > }]; >- TestWebKitAPI::Util::run(&doneLoadingURL); >+ TestWebKitAPI::runUntil(doneLoadingURL); > > NSArray *observedEventNames = [simulator observedEventNames]; > EXPECT_TRUE([observedEventNames containsObject:@"dragenter"]); >@@ -1233,7 +1233,7 @@ TEST(DragAndDropTests, ExternalSourceDat > [simulator runFrom:CGPointMake(50, 50) to:CGPointMake(150, 50)]; > }); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > EXPECT_WK_STREQ([expectedOutput componentsJoinedByString:@"\n"], [webView stringByEvaluatingJavaScript:@"output.value"]); > } > >@@ -1263,7 +1263,7 @@ TEST(DragAndDropTests, ExternalSourceDat > [simulator runFrom:CGPointMake(50, 50) to:CGPointMake(150, 50)]; > }); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > EXPECT_WK_STREQ([expectedOutput componentsJoinedByString:@"\n"], [webView stringByEvaluatingJavaScript:@"output.value"]); > } > >@@ -1320,7 +1320,7 @@ TEST(DragAndDropTests, OverrideDrop) > }]; > }]; > [simulator runFrom:CGPointMake(300, 400) to:CGPointMake(100, 300)]; >- TestWebKitAPI::Util::run(&finishedLoadingData); >+ TestWebKitAPI::runUntil(finishedLoadingData); > } > > TEST(DragAndDropTests, InjectedBundleOverridePerformTwoStepDrop) >@@ -1613,7 +1613,7 @@ TEST(DragAndDropTests, WebItemProviderPa > hasRunSecondCompletionBlock = true; > } synchronousTimeout:0]; > EXPECT_FALSE(hasRunSecondCompletionBlock); >- TestWebKitAPI::Util::run(&hasRunSecondCompletionBlock); >+ TestWebKitAPI::runUntil(hasRunSecondCompletionBlock); > } > > TEST(DragAndDropTests, DoNotCrashWhenSelectionMovesOffscreenAfterDragStart) >@@ -2004,7 +2004,7 @@ TEST(DragAndDropTests, DataTransferSetDa > @"text/uri-list": @"https://webkit.org/b/123", > } > }); >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST(DragAndDropTests, DataTransferSetDataUnescapedURL) >@@ -2041,7 +2041,7 @@ TEST(DragAndDropTests, DataTransferSetDa > @"text/uri-list": @"http://webkit.org/b/\u4F60\u597D;?x=8 + 6", > } > }); >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > TEST(DragAndDropTests, DataTransferSetDataInvalidURL) >@@ -2104,7 +2104,7 @@ TEST(DragAndDropTests, DataTransferSanit > @"text/html": @"<meta content=\"secret\"><b onmouseover=\"dangerousCode()\">hello</b><!-- secret-->, world<script>dangerousCode()</script>", > } > }); >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/ios/FocusPreservationTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/FocusPreservationTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/FocusPreservationTests.mm (working copy) >@@ -61,7 +61,7 @@ TEST(FocusPreservationTests, PreserveAnd > > TestWKWebView *webView = webViewAndDelegate.first.get(); > [webView evaluateJavaScript:@"document.querySelector('input').focus()" completionHandler:nil]; >- Util::run(&inputFocused); >+ runUntil(inputFocused); > > NSUUID *focusToken = NSUUID.UUID; > [webView.textInputContentView _preserveFocusWithToken:focusToken destructively:YES]; >@@ -86,13 +86,13 @@ TEST(FocusPreservationTests, ChangingFoc > > TestWKWebView *webView = webViewAndDelegate.first.get(); > [webView evaluateJavaScript:@"document.querySelector('input').focus()" completionHandler:nil]; >- Util::run(&inputFocused); >+ runUntil(inputFocused); > > NSUUID *focusToken = NSUUID.UUID; > [webView.textInputContentView _preserveFocusWithToken:focusToken destructively:YES]; > > [webView evaluateJavaScript:@"document.querySelector('select').focus()" completionHandler:nil]; >- Util::run(&selectFocused); >+ runUntil(selectFocused); > > EXPECT_NOT_NULL(webView.textInputContentView.inputView); > [webView selectFormAccessoryPickerRow:1]; >Index: Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm (working copy) >@@ -160,7 +160,7 @@ static RetainPtr<TestWKWebView> webViewW > [webView _setInputDelegate:inputDelegate.get()]; > [webView synchronouslyLoadHTMLString:@"<meta name='viewport' content='width=device-width, initial-scale=1'><input autofocus>"]; > >- TestWebKitAPI::Util::run(&doneWaiting); >+ TestWebKitAPI::runUntil(doneWaiting); > doneWaiting = false; > return webView; > } >@@ -289,7 +289,7 @@ TEST(KeyboardInputTests, CanHandleKeyEve > }]; > }]; > >- TestWebKitAPI::Util::run(&doneWaiting); >+ TestWebKitAPI::runUntil(doneWaiting); > EXPECT_WK_STREQ("a", [webView stringByEvaluatingJavaScript:@"document.querySelector('input').value"]); > } > >Index: Tools/TestWebKitAPI/Tests/ios/RenderingProgressTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/RenderingProgressTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/RenderingProgressTests.mm (working copy) >@@ -62,11 +62,11 @@ TEST(RenderingProgressTests, DidRenderSi > > [webView setNavigationDelegate:navigationDelegate.get()]; > [webView loadTestPageNamed:@"significant-text-milestone"]; >- TestWebKitAPI::Util::run(&observedSignificantRenderedText); >+ TestWebKitAPI::runUntil(observedSignificantRenderedText); > > observedSignificantRenderedText = false; > [webView loadTestPageNamed:@"significant-text-milestone-article"]; >- TestWebKitAPI::Util::run(&observedSignificantRenderedText); >+ TestWebKitAPI::runUntil(observedSignificantRenderedText); > } > > #endif // PLATFORM(IOS_FAMILY) >@@ -91,7 +91,7 @@ TEST(RenderingProgressTests, FirstPaintW > > [webView setNavigationDelegate:navigationDelegate.get()]; > [webView loadTestPageNamed:@"paint-significant-area-milestone"]; >- TestWebKitAPI::Util::run(&observedSignificantPaint); >+ TestWebKitAPI::runUntil(observedSignificantPaint); > } > > #endif // PLATFORM(WATCHOS) >Index: Tools/TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm (working copy) >@@ -164,7 +164,7 @@ TEST(ScrollViewInsetTests, RestoreInitia > }]; > > [webView _killWebContentProcessAndResetState]; >- Util::run(&done); >+ runUntil(done); > > EXPECT_EQ(initialContentOffset.x, contentOffsetAfterCrash.x); > EXPECT_EQ(initialContentOffset.y, contentOffsetAfterCrash.y); >@@ -181,13 +181,13 @@ TEST(ScrollViewInsetTests, RestoreInitia > delegate->_navigationComplete = NO; > NSURL *testResourceURL = [[[NSBundle mainBundle] bundleURL] URLByAppendingPathComponent:@"TestWebKitAPI.resources"]; > [webView loadHTMLString:veryTallDocumentMarkup baseURL:testResourceURL]; >- Util::run(&delegate->_navigationComplete); >+ runUntil(delegate->_navigationComplete); > > __block bool presentationUpdateHappened = false; > [webView _doAfterNextPresentationUpdate:^{ > presentationUpdateHappened = true; > }]; >- TestWebKitAPI::Util::run(&presentationUpdateHappened); >+ TestWebKitAPI::runUntil(presentationUpdateHappened); > > CGPoint initialContentOffset = [webView scrollView].contentOffset; > __block CGPoint contentOffsetAfterCrash = CGPointZero; >@@ -198,7 +198,7 @@ TEST(ScrollViewInsetTests, RestoreInitia > }]; > > [webView _killWebContentProcessAndResetState]; >- Util::run(&done); >+ runUntil(done); > > EXPECT_EQ(initialContentOffset.x, contentOffsetAfterCrash.x); > EXPECT_EQ(initialContentOffset.y, contentOffsetAfterCrash.y); >Index: Tools/TestWebKitAPI/Tests/ios/SetTimeoutFunction.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/SetTimeoutFunction.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/SetTimeoutFunction.mm (working copy) >@@ -85,11 +85,11 @@ TEST(WebKitLegacy, SetTimeoutFunction) > > RetainPtr<NSURL> url = [[NSBundle mainBundle] URLForResource:@"set-timeout-function" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; > [uiWebView loadRequest:[NSURLRequest requestWithURL:url.get()]]; >- Util::run(&loadComplete); >+ runUntil(loadComplete); > EXPECT_TRUE(loadComplete); > EXPECT_FALSE(loadFailed); > >- Util::run(&testComplete); >+ runUntil(testComplete); > EXPECT_WK_STREQ("3", numberOfSetTimeoutCallbacks.get()); > } > >Index: Tools/TestWebKitAPI/Tests/ios/UIPasteboardTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/UIPasteboardTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/UIPasteboardTests.mm (working copy) >@@ -156,7 +156,7 @@ TEST(UIPasteboardTests, PasteWithComplet > done = true; > }]; > >- Util::run(&done); >+ runUntil(done); > > EXPECT_WK_STREQ("text/uri-list, text/plain", [webView stringByEvaluatingJavaScript:@"types.textContent"]); > EXPECT_WK_STREQ("(STRING, text/uri-list), (STRING, text/plain)", [webView stringByEvaluatingJavaScript:@"items.textContent"]); >Index: Tools/TestWebKitAPI/Tests/ios/WKScrollViewDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/WKScrollViewDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/WKScrollViewDelegate.mm (working copy) >@@ -61,7 +61,7 @@ TEST(WKWebView, WKScrollViewDelegateCras > } > delegateIsDeallocated = false; > [delegateForScrollView release]; >- TestWebKitAPI::Util::run(&delegateIsDeallocated); >+ TestWebKitAPI::runUntil(delegateIsDeallocated); > > EXPECT_NULL(webView.scrollView.delegate); > } >Index: Tools/TestWebKitAPI/Tests/ios/WKScrollViewTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/WKScrollViewTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/WKScrollViewTests.mm (working copy) >@@ -56,7 +56,7 @@ TEST(WKScrollViewTests, PositionFixedLay > // opportunity to arrive in the UI process before dispatching the next visible content rect update. > usleep(USEC_PER_SEC * 0.25); > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > > bool foundLayerForFixedNavigationBar = false; > traverseLayerTree([webView layer], [&] (CALayer *layer) { >Index: Tools/TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm (working copy) >@@ -181,7 +181,7 @@ TEST(WKWebViewAutofillTests, AutofillReq > }]; > [webView synchronouslyLoadHTMLString:@"<input id='user' type='email'><input id='password' type='password'>"]; > [webView stringByEvaluatingJavaScript:@"user.focus()"]; >- Util::run(&done); >+ runUntil(done); > > EXPECT_FALSE([webView textInputHasAutofillContext]); > } >Index: Tools/TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.mm (working copy) >@@ -63,7 +63,7 @@ static void runTest(NSArray *additionalS > RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"AdditionalSupportedImageTypes" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:testURL.get()]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > DOMDocument *document = webView.get().mainFrameDocument; >Index: Tools/TestWebKitAPI/Tests/mac/BackForwardList.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/BackForwardList.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/BackForwardList.mm (working copy) >@@ -58,11 +58,11 @@ TEST(WebKitLegacy, ReloadBackForward) > RetainPtr<BackForwardListTest> testController = adoptNS([BackForwardListTest new]); > webView.get().frameLoadDelegate = testController.get(); > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://does-not-exist.example"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > [[webView.get() mainFrame] reload]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > WebBackForwardList *bfList = [webView.get() backForwardList]; >Index: Tools/TestWebKitAPI/Tests/mac/CancelLoadFromResourceLoadDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/CancelLoadFromResourceLoadDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/CancelLoadFromResourceLoadDelegate.mm (working copy) >@@ -73,7 +73,7 @@ TEST(WebKitLegacy, CancelLoadFromResourc > > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"CancelLoadFromResourceLoadDelegate" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > [pool drain]; > // If we finished without crashing, the test passed. >Index: Tools/TestWebKitAPI/Tests/mac/CandidateTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/CandidateTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/CandidateTests.mm (working copy) >@@ -93,8 +93,8 @@ TEST(CandidateTests, DISABLED_DoNotLeakV > NSURL *contentURL = [[NSBundle mainBundle] URLForResource:@"autofocused-text-input" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; > [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:contentURL]]; > >- TestWebKitAPI::Util::run(&didFinishLoad); >- TestWebKitAPI::Util::run(&didCallShowCandidates); >+ TestWebKitAPI::runUntil(didFinishLoad); >+ TestWebKitAPI::runUntil(didCallShowCandidates); > > [webView release]; > EXPECT_TRUE(webViewWasDeallocated); >@@ -110,7 +110,7 @@ TEST(CandidateTests, DISABLED_RequestCan > NSURL *contentURL = [[NSBundle mainBundle] URLForResource:@"focus-inputs" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; > [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:contentURL]]; > >- TestWebKitAPI::Util::run(&didFinishLoad); >+ TestWebKitAPI::runUntil(didFinishLoad); > > [webView forceRequestCandidatesForTesting]; > >@@ -131,7 +131,7 @@ TEST(CandidateTests, DoNotRequestCandida > NSURL *contentURL = [[NSBundle mainBundle] URLForResource:@"focus-inputs" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; > [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:contentURL]]; > >- TestWebKitAPI::Util::run(&didFinishLoad); >+ TestWebKitAPI::runUntil(didFinishLoad); > > [webView forceRequestCandidatesForTesting]; > [webView stringByEvaluatingJavaScriptFromString:@"focusPasswordField()"]; >Index: Tools/TestWebKitAPI/Tests/mac/CloseNewWindowInNavigationPolicyDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/CloseNewWindowInNavigationPolicyDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/CloseNewWindowInNavigationPolicyDelegate.mm (working copy) >@@ -76,7 +76,7 @@ TEST(WebKitLegacy, CloseNewWindowInNavig > webView.get().UIDelegate = [TestDelegate shared]; > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"OpenNewWindow" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&testFinished); >+ runUntil(testFinished); > > [pool drain]; > } >Index: Tools/TestWebKitAPI/Tests/mac/ContentFiltering.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/ContentFiltering.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/ContentFiltering.mm (working copy) >@@ -74,7 +74,7 @@ static void loadAlternateTest(Decision d > [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://redirect/?result"]]]; > > isDone = false; >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > > settings.setEnabled(false); > [TestProtocol unregister]; >Index: Tools/TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm (working copy) >@@ -97,7 +97,7 @@ TEST(WebKitLegacy, ContextMenuCanCopyURL > > [webView.get().mainFrame loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"ContextMenuCanCopyURL" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > contextMenuCopyLink(webView.get(), 0); > >Index: Tools/TestWebKitAPI/Tests/mac/ContextMenuDefaultItemsHaveTags.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/ContextMenuDefaultItemsHaveTags.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/ContextMenuDefaultItemsHaveTags.mm (working copy) >@@ -58,7 +58,7 @@ TEST(WebKitLegacy, ContextMenuDefaultIte > > [webView.get().mainFrame loadHTMLString:@"<body contenteditable>" baseURL:nil]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeRightMouseDown location:NSMakePoint(400, 300) modifierFlags:0 timestamp:[NSDate timeIntervalSinceReferenceDate] > windowNumber:[window windowNumber] context:[NSGraphicsContext currentContext] eventNumber:0 clickCount:0 pressure:0]; >Index: Tools/TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm (working copy) >@@ -99,7 +99,7 @@ TEST(WebKitLegacy, CrossPartitionFileSch > > NSURLRequest *request = [NSURLRequest requestWithURL:url]; > [webView loadRequest:request]; >- Util::run(&navigationComplete); >+ runUntil(navigationComplete); > cleanUp(); > } > } >Index: Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm (working copy) >@@ -63,7 +63,7 @@ TEST(WebKitLegacy, HTMLTableCellElementC > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] > URLForResource:@"DOMHTMLTableCellElementCellAbove" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > DOMDocument *document = webView.get().mainFrameDocument; >Index: Tools/TestWebKitAPI/Tests/mac/DOMHTMLVideoElementWrapper.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/DOMHTMLVideoElementWrapper.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/DOMHTMLVideoElementWrapper.mm (working copy) >@@ -55,7 +55,7 @@ TEST(WebKitLegacy, DOMHTMLVideoElementWr > webView.get().frameLoadDelegate = frameLoadDelegate.get(); > [webView.get().mainFrame loadHTMLString:@"" baseURL:[NSURL URLWithString:@"about:blank"]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > DOMDocument *document = webView.get().mainFrameDocument; > DOMElement *video = [document createElement:@"video"]; >Index: Tools/TestWebKitAPI/Tests/mac/DOMNode.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/DOMNode.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/DOMNode.mm (working copy) >@@ -54,7 +54,7 @@ TEST(WebKitLegacy, DOMNodeCompareDocumen > webView.get().frameLoadDelegate = testController.get(); > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > DOMDocument *document = webView.get().mainFrameDocument; >Index: Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm (working copy) >@@ -54,7 +54,7 @@ TEST(WebKitLegacy, DOMRangeOfString) > webView.get().frameLoadDelegate = frameLoadDelegate.get(); > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"DOMRangeOfString" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > DOMRange *resultRange = [webView.get() DOMRangeOfString:@"needles" relativeTo:nil options:0]; > EXPECT_EQ(nil, resultRange); >Index: Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm (working copy) >@@ -64,7 +64,7 @@ TEST(WebKitLegacy, DeviceScaleFactorInDa > > [webView.get().mainFrame loadHTMLString:@"<div style='position: absolute; top: 10px; left: 10px; width: 50px; height: 50px; -webkit-dashboard-region: dashboard-region(control rectangle);'></div>" baseURL:[NSURL URLWithString:@"about:blank"]]; > >- Util::run(&gotDashboardRegions); >+ runUntil(gotDashboardRegions); > > NSRect controlRegionRect = [[[regions objectForKey:@"control"] objectAtIndex:0] dashboardRegionRect]; > >Index: Tools/TestWebKitAPI/Tests/mac/ElementAtPointInWebFrame.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/ElementAtPointInWebFrame.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/ElementAtPointInWebFrame.mm (working copy) >@@ -55,7 +55,7 @@ TEST(WebKitLegacy, ElementAtPoint) > [mainFrame loadHTMLString:@"<style> div { position:absolute; width:60px; height:100px; } </style> <div name='first'></div> <div name='second' style='left:60px; top:100px;'></div>" > baseURL:[NSURL URLWithString:@"about:blank"]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > NSDictionary *elementDictionary = [mainFrame elementAtPoint:NSMakePoint(30, 50)]; > DOMElement *domElement = [elementDictionary objectForKey:WebElementDOMNodeKey]; >Index: Tools/TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm (working copy) >@@ -69,7 +69,7 @@ TEST(WebKit, FirstResponderScrollingPosi > > WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple-tall", "html")); > WKPageLoadURL(webView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > EXPECT_JS_EQ(webView.page(), "var input = document.createElement('input');" >@@ -89,7 +89,7 @@ TEST(WebKit, FirstResponderScrollingPosi > [window.get() makeFirstResponder:newWebView.platformView()]; > > WKPageLoadURL(newWebView.page(), url.get()); >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_JS_EQ(webView.page(), "window.scrollY", "40"); > EXPECT_JS_EQ(newWebView.page(), "window.scrollY", "0"); >Index: Tools/TestWebKitAPI/Tests/mac/FirstResponderSuppression.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/FirstResponderSuppression.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/FirstResponderSuppression.mm (working copy) >@@ -64,7 +64,7 @@ TEST(WebKit, FirstResponderSuppression) > // Ensure having an autofocused input field does not steal focus. > NSString *testHTML = @"<!doctype html><html><body><input type=\"text\" autofocus /></body></html>"; > [webView loadHTMLString:testHTML baseURL:nil]; >- TestWebKitAPI::Util::run(&finishedLoad); >+ TestWebKitAPI::runUntil(finishedLoad); > EXPECT_EQ([window firstResponder], [window contentView]); > finishedLoad = false; > >@@ -72,7 +72,7 @@ TEST(WebKit, FirstResponderSuppression) > > // Ensure having an autofocused input field does steal focus. > [webView loadHTMLString:testHTML baseURL:nil]; >- TestWebKitAPI::Util::run(&finishedLoad); >+ TestWebKitAPI::runUntil(finishedLoad); > EXPECT_NE([window firstResponder], [window contentView]); > } > >Index: Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm (working copy) >@@ -70,7 +70,7 @@ - (NSDictionary<NSString *, id> *)typing > result = attributes; > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > return result.autorelease(); > } > >Index: Tools/TestWebKitAPI/Tests/mac/FragmentNavigation.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/FragmentNavigation.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/FragmentNavigation.mm (working copy) >@@ -120,7 +120,7 @@ TEST(WebKitLegacy, FragmentNavigation) > [webView setUIDelegate:[WebKit1FragmentNavigationTestDelegate shared]]; > [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"FragmentNavigation" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&testFinished); >+ runUntil(testFinished); > } > } > >Index: Tools/TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm (working copy) >@@ -165,7 +165,7 @@ void FullscreenZoomInitialFrame::runTest > isWaitingForPageSignalToContinue = true; > didGetPageSignalToContinue = false; > sendMouseDownEvent(view, event); >- Util::run(&didGetPageSignalToContinue); >+ runUntil(didGetPageSignalToContinue); > > id windowController = [[view window] windowController]; > EXPECT_TRUE([windowController respondsToSelector:@selector(initialFrame)]); >@@ -182,7 +182,7 @@ void FullscreenZoomInitialFrame::runTest > isWaitingForPageSignalToContinue = true; > didGetPageSignalToContinue = false; > sendMouseDownEvent(view, event); >- Util::run(&didGetPageSignalToContinue); >+ runUntil(didGetPageSignalToContinue); > } > > TEST_F(FullscreenZoomInitialFrame, WebKit) >Index: Tools/TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm (working copy) >@@ -57,7 +57,7 @@ TEST(WebKitLegacy, HTMLCollectionNamedIt > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] > URLForResource:@"HTMLCollectionNamedItem" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > DOMDocument *document = webView.get().mainFrameDocument; >Index: Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm (working copy) >@@ -57,7 +57,7 @@ TEST(WebKitLegacy, HTMLFormCollectionNam > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] > URLForResource:@"HTMLFormCollectionNamedItem" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > DOMDocument *document = webView.get().mainFrameDocument; >Index: Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm (working copy) >@@ -58,7 +58,7 @@ TEST(WebKitLegacy, InspectorBarTest) > webView.get().frameLoadDelegate = inspectorBarController.get(); > [webView.get().mainFrame loadHTMLString:@"<body contenteditable style=\"color: green\"><u>Lorem ipsum sit amet</u></body>" baseURL:[NSURL URLWithString:@"about:blank"]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > DOMDocument *document = webView.get().mainFrameDocument; > [[document body] focus]; >Index: Tools/TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.mm (working copy) >@@ -87,7 +87,7 @@ TEST(WebKit, IsNavigationActionTrusted) > [webView loadRequest:request]; > > didFinishTest = false; >- Util::run(&didFinishTest); >+ runUntil(didFinishTest); > } > } > >@@ -101,7 +101,7 @@ TEST(WebKitLegacy, IsNavigationActionTru > [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IsNavigationActionTrusted" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > > didFinishTest = false; >- Util::run(&didFinishTest); >+ runUntil(didFinishTest); > } > } > >Index: Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm (working copy) >@@ -58,7 +58,7 @@ TEST(WebKitLegacy, JSWrapperForNode) > webView.get().frameLoadDelegate = frameLoadDelegate.get(); > WebFrame *mainFrame = webView.get().mainFrame; > [mainFrame loadHTMLString:@"<div id=\"target\"</div>" baseURL:[NSURL URLWithString:@"about:blank"]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > DOMDocument *document = webView.get().mainFrameDocument; > DOMNode *target = [document getElementById:@"target"]; // This script object is in standard world. > >Index: Tools/TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm (working copy) >@@ -232,7 +232,7 @@ static WebView *webViewAfterPerformingDr > }]]; > [[destination mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"full-page-contenteditable" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > return destination.get(); > } > >Index: Tools/TestWebKitAPI/Tests/mac/LimitTitleSize.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/LimitTitleSize.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/LimitTitleSize.mm (working copy) >@@ -65,7 +65,7 @@ TEST(WebKitLegacy, LimitTitleSize) > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] > URLForResource:@"set-long-title" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- TestWebKitAPI::Util::run(&didFinishLoad); >+ TestWebKitAPI::runUntil(didFinishLoad); > } > > @interface LimitTitleSizeTestObserver : NSObject >@@ -91,6 +91,6 @@ TEST(WebKit, LimitTitleSize) > auto observer = adoptNS([LimitTitleSizeTestObserver new]); > [webView addObserver:observer.get() forKeyPath:@"title" options:NSKeyValueObservingOptionNew context:nil]; > >- TestWebKitAPI::Util::run(&waitUntilLongTitleReceived); >+ TestWebKitAPI::runUntil(waitUntilLongTitleReceived); > [webView removeObserver:observer.get() forKeyPath:@"title"]; > } >Index: Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm (working copy) >@@ -75,7 +75,7 @@ TEST(WebKitLegacy, LoadInvalidURLRequest > > didFinishTest = false; > didFailProvisionalLoad = false; >- Util::run(&didFinishTest); >+ runUntil(didFinishTest); > > EXPECT_FALSE(didFailProvisionalLoad); > } >Index: Tools/TestWebKitAPI/Tests/mac/LoadWebArchive.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/LoadWebArchive.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/LoadWebArchive.mm (working copy) >@@ -82,7 +82,7 @@ TEST(LoadWebArchive, FailNavigation1) > > navigationFail = false; > [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]]; >- Util::run(&navigationFail); >+ runUntil(navigationFail); > > EXPECT_WK_STREQ(finalURL, "helloworld.webarchive"); > } >@@ -101,7 +101,7 @@ TEST(LoadWebArchive, FailNavigation2) > > navigationFail = false; > [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]]; >- Util::run(&navigationFail); >+ runUntil(navigationFail); > > EXPECT_WK_STREQ(finalURL, "helloworld.webarchive"); > } >@@ -116,7 +116,7 @@ TEST(LoadWebArchive, ClientNavigationSuc > > navigationComplete = false; > [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]]; >- Util::run(&navigationComplete); >+ runUntil(navigationComplete); > > EXPECT_WK_STREQ(finalURL, "helloworld.webarchive"); > } >@@ -131,12 +131,12 @@ TEST(LoadWebArchive, ClientNavigationRel > > navigationComplete = false; > [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]]; >- Util::run(&navigationComplete); >+ runUntil(navigationComplete); > EXPECT_WK_STREQ(finalURL, "helloworld.webarchive"); > > navigationComplete = false; > [webView reload]; >- Util::run(&navigationComplete); >+ runUntil(navigationComplete); > EXPECT_WK_STREQ(finalURL, ""); > } > >@@ -160,12 +160,12 @@ TEST(LoadWebArchive, DragNavigationSucce > > navigationComplete = false; > [webView loadRequest:[NSURLRequest requestWithURL:simpleURL.get()]]; >- Util::run(&navigationComplete); >+ runUntil(navigationComplete); > EXPECT_WK_STREQ(finalURL, "simple.html"); > > navigationComplete = false; > [simulator runFrom:CGPointMake(0, 0) to:CGPointMake(50, 50)]; >- Util::run(&navigationComplete); >+ runUntil(navigationComplete); > EXPECT_WK_STREQ(finalURL, "helloworld.webarchive"); > } > >@@ -189,17 +189,17 @@ TEST(LoadWebArchive, DragNavigationReloa > > navigationComplete = false; > [webView loadRequest:[NSURLRequest requestWithURL:simpleURL.get()]]; >- Util::run(&navigationComplete); >+ runUntil(navigationComplete); > EXPECT_WK_STREQ(finalURL, "simple.html"); > > navigationComplete = false; > [simulator runFrom:CGPointMake(0, 0) to:CGPointMake(50, 50)]; >- Util::run(&navigationComplete); >+ runUntil(navigationComplete); > EXPECT_WK_STREQ(finalURL, "helloworld.webarchive"); > > navigationComplete = false; > [webView reload]; >- Util::run(&navigationComplete); >+ runUntil(navigationComplete); > EXPECT_WK_STREQ(finalURL, ""); > } > >Index: Tools/TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.mm (working copy) >@@ -165,26 +165,26 @@ TEST(WebKitLegacy, MediaPlaybackSleepAss > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"MediaPlaybackSleepAssertion" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; > [mainFrame loadRequest:request]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > EXPECT_FALSE(hasAssertionType(CFSTR("PreventUserIdleDisplaySleep"))); > EXPECT_FALSE(hasAssertionType(CFSTR("PreventUserIdleSystemSleep"))); > > simulateKeyDown(window.get()); >- Util::run(&didBeginPlaying); >+ runUntil(didBeginPlaying); > > EXPECT_TRUE(hasAssertionType(CFSTR("PreventUserIdleDisplaySleep"))); > EXPECT_FALSE(hasAssertionType(CFSTR("PreventUserIdleSystemSleep"))); > > simulateKeyDown(window.get()); >- Util::run(&didBeginRemotePlayback); >+ runUntil(didBeginRemotePlayback); > > EXPECT_FALSE(hasAssertionType(CFSTR("PreventUserIdleDisplaySleep"))); > EXPECT_TRUE(hasAssertionType(CFSTR("PreventUserIdleSystemSleep"))); > > simulateKeyDown(window.get()); >- Util::run(&didStopPlaying); >+ runUntil(didStopPlaying); > > EXPECT_FALSE(hasAssertionType(CFSTR("PreventUserIdleDisplaySleep"))); > EXPECT_FALSE(hasAssertionType(CFSTR("PreventUserIdleSystemSleep"))); >Index: Tools/TestWebKitAPI/Tests/mac/MemoryCacheDisableWithinResourceLoadDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/MemoryCacheDisableWithinResourceLoadDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/MemoryCacheDisableWithinResourceLoadDelegate.mm (working copy) >@@ -81,7 +81,7 @@ TEST(WebKitLegacy, MemoryCacheDisableWit > > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"MemoryCacheDisableWithinResourceLoadDelegate" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > [pool drain]; > // If we finished without crashing, the test passed. >Index: Tools/TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm (working copy) >@@ -91,7 +91,7 @@ TEST(WebKitLegacy, DISABLED_MemoryCacheP > > [[webView1.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"MemoryCachePruneWithinResourceLoadDelegate" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > [pool drain]; > // If we finished without crashing, the test passed. >Index: Tools/TestWebKitAPI/Tests/mac/NavigatorLanguage.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/NavigatorLanguage.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/NavigatorLanguage.mm (working copy) >@@ -98,7 +98,7 @@ TEST(WebKitLegacy, NavigatorLanguage) > webView.get().frameLoadDelegate = frameLoadDelegate.get(); > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > for (NSArray *test in tests) > EXPECT_WK_STREQ([test objectAtIndex:1], languageForSystemLanguage(webView.get(), [test objectAtIndex:0])); > } >@@ -125,7 +125,7 @@ TEST(WKWebView, NavigatorLanguage) > > runTest(0); > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/Tests/mac/NoPolicyDelegateResponse.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/NoPolicyDelegateResponse.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/NoPolicyDelegateResponse.mm (working copy) >@@ -82,7 +82,7 @@ TEST(WebKitLegacy, NoDecidePolicyForMIME > webView.get().policyDelegate = delegate.get(); > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"verboseMarkup" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_TRUE(didNavigationResponseCheck); > } >@@ -96,7 +96,7 @@ TEST(WebKitLegacy, NoDecidePolicyForNavi > webView.get().policyDelegate = delegate.get(); > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"verboseMarkup" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didNavigationActionCheck); >+ runUntil(didNavigationActionCheck); > > EXPECT_FALSE(didStartProvisionalLoad); > } >Index: Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm (working copy) >@@ -137,7 +137,7 @@ void PageVisibilityStateWithWindowChange > didGetPageSignalToContinue = false; > [window.get() makeKeyAndOrderFront:nil]; > EXPECT_TRUE([window.get() isVisible]); >- Util::run(&didGetPageSignalToContinue); >+ runUntil(didGetPageSignalToContinue); > EXPECT_JS_EQ(view, "document.visibilityState", "visible"); > EXPECT_JS_EQ(view, "document.hidden", "false"); > >@@ -145,7 +145,7 @@ void PageVisibilityStateWithWindowChange > isWaitingForPageSignalToContinue = true; > didGetPageSignalToContinue = false; > [window.get() miniaturize:nil]; >- Util::run(&didGetPageSignalToContinue); >+ runUntil(didGetPageSignalToContinue); > EXPECT_JS_EQ(view, "document.visibilityState", "hidden"); > EXPECT_JS_EQ(view, "document.hidden", "true"); > >@@ -153,7 +153,7 @@ void PageVisibilityStateWithWindowChange > isWaitingForPageSignalToContinue = true; > didGetPageSignalToContinue = false; > [window.get() deminiaturize:nil]; >- Util::run(&didGetPageSignalToContinue); >+ runUntil(didGetPageSignalToContinue); > EXPECT_JS_EQ(view, "document.visibilityState", "visible"); > EXPECT_JS_EQ(view, "document.hidden", "false"); > >@@ -164,7 +164,7 @@ void PageVisibilityStateWithWindowChange > EXPECT_NULL([view window]); > EXPECT_NULL([view superview]); > EXPECT_TRUE([window.get() isVisible]); >- Util::run(&didGetPageSignalToContinue); >+ runUntil(didGetPageSignalToContinue); > EXPECT_JS_EQ(view, "document.visibilityState", "hidden"); > EXPECT_JS_EQ(view, "document.hidden", "true"); > } >Index: Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMNode.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMNode.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMNode.mm (working copy) >@@ -54,7 +54,7 @@ TEST(WebKitLegacy, RenderedImageFromDOMN > [webView setFrameLoadDelegate:frameLoadDelegate.get()]; > [[webView mainFrame] loadHTMLString:@"<p><span id=\"t1\" style=\"vertical-align: bottom;\">Span</span></p><p><span id=\"t2\">Span</span></p>" baseURL:[NSURL URLWithString:@"about:blank"]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > DOMDocument *document = [webView mainFrameDocument]; > NSImage *image1 = [[document getElementById:@"t1"] renderedImage]; >Index: Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm (working copy) >@@ -54,7 +54,7 @@ TEST(WebKitLegacy, RenderedImageFromDOMR > webView.get().frameLoadDelegate = frameLoadDelegate.get(); > [webView.get().mainFrame loadHTMLString:@"<div style=\"width: 100px;\">Lorem <span id=\"target\">ipsum dolor</span> sit amet</div>" baseURL:[NSURL URLWithString:@"about:blank"]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > DOMDocument *document = webView.get().mainFrameDocument; > DOMRange *range = [document createRange]; >Index: Tools/TestWebKitAPI/Tests/mac/SetDocumentURI.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/SetDocumentURI.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/SetDocumentURI.mm (working copy) >@@ -53,7 +53,7 @@ TEST(WebKitLegacy, SetDocumentURITestFil > RetainPtr<SetDocumentURITest> testController = adoptNS([SetDocumentURITest new]); > webView.get().frameLoadDelegate = testController.get(); > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"SetDocumentURI" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > DOMDocument *document = webView.get().mainFrameDocument; > >@@ -70,7 +70,7 @@ TEST(WebKitLegacy, SetDocumentURITestURL > RetainPtr<SetDocumentURITest> testController = adoptNS([SetDocumentURITest new]); > webView.get().frameLoadDelegate = testController.get(); > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"SetDocumentURI" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > DOMDocument *document = webView.get().mainFrameDocument; > >@@ -90,7 +90,7 @@ TEST(WebKitLegacy, SetDocumentURITestStr > RetainPtr<SetDocumentURITest> testController = adoptNS([SetDocumentURITest new]); > webView.get().frameLoadDelegate = testController.get(); > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"SetDocumentURI" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > DOMDocument *document = webView.get().mainFrameDocument; > >@@ -106,7 +106,7 @@ TEST(WebKitLegacy, SetDocumentURITestNul > RetainPtr<SetDocumentURITest> testController = adoptNS([SetDocumentURITest new]); > webView.get().frameLoadDelegate = testController.get(); > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"SetDocumentURI" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > DOMDocument *document = webView.get().mainFrameDocument; > >Index: Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm (working copy) >@@ -56,13 +56,13 @@ TEST(WebKitLegacy, SimplifyMarkupTest) > webView1.get().frameLoadDelegate = testController.get(); > [[webView1.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"verboseMarkup" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > > webView2.get().frameLoadDelegate = testController.get(); > [[webView2.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"verboseMarkup" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > while (![[[[webView1 mainFrameDocument] body] innerHTML] isEqualToString:[[[webView2 mainFrameDocument] body] innerHTML]]) > Util::spinRunLoop(1); >Index: Tools/TestWebKitAPI/Tests/mac/StartLoadInDidFailProvisionalLoad.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/StartLoadInDidFailProvisionalLoad.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/StartLoadInDidFailProvisionalLoad.mm (working copy) >@@ -63,7 +63,7 @@ TEST(WebKitLegacy, StartLoadInDidFailPro > > // Start another load before the first one has a chance to complete. This should cancel the previous load and call didFailProvisionalLoadWithError. > [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; >- Util::run(&finished); >+ runUntil(finished); > EXPECT_TRUE(didFailProvisionalLoad); > > EXPECT_WK_STREQ([[[NSBundle mainBundle] URLForResource:@"simple2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"] absoluteString], webView.get().mainFrameURL); >Index: Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidFinishLoading.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidFinishLoading.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidFinishLoading.mm (working copy) >@@ -52,7 +52,7 @@ TEST(WebKitLegacy, StopLoadingFromDidFin > auto resourceLoadDelegate = adoptNS([[StopLoadingFromDidFinishLoadingDelegate alloc] init]); > webView.get().resourceLoadDelegate = resourceLoadDelegate.get(); > [webView.get().mainFrame loadHTMLString:@"Hello, World!" baseURL:[NSURL URLWithString:@""]]; >- Util::run(&finished); >+ runUntil(finished); > } > // No crash means the test passed. > } >Index: Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm (working copy) >@@ -64,7 +64,7 @@ TEST(WebKitLegacy, StopLoadingFromDidRec > > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"StopLoadingFromDidReceiveResponse" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > [pool drain]; > // If we finished without crashing, the test passed. >Index: Tools/TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm (working copy) >@@ -92,7 +92,7 @@ TEST(WKWebViewMacEditingTests, DoubleCli > finishedSelectingText = true; > }]; > [webView sendClicksAtPoint:NSMakePoint(200, 200) numberOfClicks:2]; >- TestWebKitAPI::Util::run(&finishedSelectingText); >+ TestWebKitAPI::runUntil(finishedSelectingText); > > NSString *selectedText = [webView stringByEvaluatingJavaScript:@"getSelection().getRangeAt(0).toString()"]; > EXPECT_STREQ("Hello", selectedText.UTF8String); >@@ -133,7 +133,7 @@ TEST(WKWebViewMacEditingTests, DoNotCras > }; > } > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > } > > #endif // PLATFORM(MAC) >Index: Tools/TestWebKitAPI/Tests/mac/WebScriptObjectDescription.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/WebScriptObjectDescription.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/WebScriptObjectDescription.mm (working copy) >@@ -68,7 +68,7 @@ TEST(WebKitLegacy, WebScriptObjectDescri > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] > URLForResource:@"WebScriptObjectDescription" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > failedObjCDescription = false; > >Index: Tools/TestWebKitAPI/Tests/mac/WebViewCloseInsideDidFinishLoadForFrame.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/WebViewCloseInsideDidFinishLoadForFrame.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/WebViewCloseInsideDidFinishLoadForFrame.mm (working copy) >@@ -57,7 +57,7 @@ TEST(WebKitLegacy, WebViewCloseInsideDid > webView.get().frameLoadDelegate = frameLoadDelegate.get(); > [webView.get().mainFrame loadHTMLString:@"<html></html>" baseURL:nil]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > } > } > >Index: Tools/TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm (working copy) >@@ -158,7 +158,7 @@ TEST(WebKitLegacy, DidCreateJavaScriptCo > NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"]; > > [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL]; >- Util::run(&didCompleteTestSuccessfully); >+ runUntil(didCompleteTestSuccessfully); > } > } > >@@ -181,7 +181,7 @@ TEST(WebKitLegacy, DidCreateJavaScriptCo > NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"]; > > [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL]; >- Util::run(&didCallWindowCallback); >+ runUntil(didCallWindowCallback); > } > } > >@@ -205,7 +205,7 @@ TEST(WebKitLegacy, DidCreateJavaScriptCo > NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"]; > > [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL]; >- Util::run(&didCompleteTestSuccessfully); >+ runUntil(didCompleteTestSuccessfully); > } > } > >@@ -231,7 +231,7 @@ TEST(WebKitLegacy, DidCreateJavaScriptCo > NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"]; > > [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL]; >- Util::run(&didFindMyCustomProperty); >+ runUntil(didFindMyCustomProperty); > } > } > >@@ -259,7 +259,7 @@ TEST(WebKitLegacy, DidCreateJavaScriptCo > NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"]; > > [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL]; >- Util::run(&didFindMyCustomProperty); >+ runUntil(didFindMyCustomProperty); > } > } > >@@ -280,13 +280,13 @@ TEST(WebKitLegacy, DidCreateJavaScriptCo > withExtension:@"html" > subdirectory:@"TestWebKitAPI.resources"]; > [mainFrame loadRequest:[NSURLRequest requestWithURL:url1]]; >- Util::run(&didInsertMyCustomProperty); >+ runUntil(didInsertMyCustomProperty); > > NSURL *url2 = [[NSBundle mainBundle] URLForResource:@"JSContextBackForwardCache2" > withExtension:@"html" > subdirectory:@"TestWebKitAPI.resources"]; > [mainFrame loadRequest:[NSURLRequest requestWithURL:url2]]; >- Util::run(&didCompleteTestSuccessfully); >+ runUntil(didCompleteTestSuccessfully); > > didCompleteTestSuccessfully = false; > [[mainFrame javaScriptContext] evaluateScript: >@@ -325,7 +325,7 @@ TEST(WebKitLegacy, ReportExceptionTest) > NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"]; > > [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL]; >- Util::run(&didReportException); >+ runUntil(didReportException); > } > } > >Index: Tools/TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm (working copy) >@@ -62,7 +62,7 @@ TEST(WebKitLegacy, DidRemoveFrameFromHie > NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"]; > > [mainFrame loadHTMLString:bodyWithIFrameString baseURL:aboutBlankURL]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > EXPECT_FALSE(didRemoveFrame); > [webView.get() stringByEvaluatingJavaScriptFromString:@"document.body.removeChild(document.getElementById('iframe'))"]; >@@ -72,7 +72,7 @@ TEST(WebKitLegacy, DidRemoveFrameFromHie > didRemoveFrame = false; > > [mainFrame loadHTMLString:bodyWithIFrameString baseURL:aboutBlankURL]; >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > // The delegate method is not called when the frame is removed due to navigation in an ancestor frame. > EXPECT_FALSE(didRemoveFrame); >Index: Tools/TestWebKitAPI/Tests/mac/WebViewIconLoading.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/WebViewIconLoading.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/WebViewIconLoading.mm (working copy) >@@ -172,7 +172,7 @@ TEST(WebKitLegacy, IconLoadingDelegateDe > webView.get().frameLoadDelegate = frameLoadDelegate.get(); > [webView.get().mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://testserver/1/main"]]]; > >- Util::run(&messageReceived); >+ runUntil(messageReceived); > > EXPECT_TRUE([[frameLoadDelegate->receivedIcon.get() TIFFRepresentation] isEqual:[imageFromData(defaultFaviconData()) TIFFRepresentation]]); > EXPECT_TRUE([[webView.get().mainFrameIcon TIFFRepresentation] isEqual:[imageFromData(defaultFaviconData()) TIFFRepresentation]]); >@@ -185,7 +185,7 @@ TEST(WebKitLegacy, IconLoadingDelegateDe > currentMainHTML = customFaviconHTML; > [webView.get().mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://testserver/2/main"]]]; > >- Util::run(&messageReceived); >+ runUntil(messageReceived); > > EXPECT_TRUE([[frameLoadDelegate->receivedIcon.get() TIFFRepresentation] isEqual:[imageFromData(customFaviconData()) TIFFRepresentation]]); > EXPECT_TRUE([[webView.get().mainFrameIcon TIFFRepresentation] isEqual:[imageFromData(customFaviconData()) TIFFRepresentation]]); >@@ -213,7 +213,7 @@ TEST(WebKitLegacy, IconLoadingDelegateCu > webView.get().frameLoadDelegate = frameLoadDelegate.get(); > [webView.get().mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://testserver/1/main"]]]; > >- Util::run(&messageReceived); >+ runUntil(messageReceived); > > EXPECT_TRUE([[frameLoadDelegate->receivedIcon.get() TIFFRepresentation] isEqual:[imageFromData(customFaviconData()) TIFFRepresentation]]); > EXPECT_TRUE([[webView.get().mainFrameIcon TIFFRepresentation] isEqual:[imageFromData(customFaviconData()) TIFFRepresentation]]); >@@ -226,7 +226,7 @@ TEST(WebKitLegacy, IconLoadingDelegateCu > currentMainHTML = defaultFaviconHTML; > [webView.get().mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://testserver/2/main"]]]; > >- Util::run(&messageReceived); >+ runUntil(messageReceived); > > EXPECT_TRUE([[frameLoadDelegate->receivedIcon.get() TIFFRepresentation] isEqual:[imageFromData(defaultFaviconData()) TIFFRepresentation]]); > EXPECT_TRUE([[webView.get().mainFrameIcon TIFFRepresentation] isEqual:[imageFromData(defaultFaviconData()) TIFFRepresentation]]); >Index: Tools/TestWebKitAPI/Tests/mac/WillPerformClientRedirectToURLCrash.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/WillPerformClientRedirectToURLCrash.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/WillPerformClientRedirectToURLCrash.mm (working copy) >@@ -79,7 +79,7 @@ TEST(WebKitLegacy, WillPerformClientRedi > [webView setFrameLoadDelegate: [WebKit1TestDelegate shared]]; > [webView setUIDelegate:[WebKit1TestDelegate shared]]; > [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:testURL()]]; >- Util::run(&testFinished); >+ runUntil(testFinished); > } > } > >Index: Tools/TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm (working copy) >@@ -67,7 +67,7 @@ TEST(WebKitLegacy, WillSendSubmitEvent) > > [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"auto-submitting-form" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > } > } > >Index: Tools/TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm (working copy) >@@ -72,7 +72,7 @@ TEST(WebKitLegacy, WindowlessWebViewWith > > EXPECT_EQ(nil, [webView.get() window]); > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > spinLoop(0.25, ^{ > return [[webView.get() stringByEvaluatingJavaScriptFromString:@"window.didTriggerLoad"] isEqualToString:@"true"]; >Index: Tools/TestWebKitAPI/Tests/mac/WordBoundaryTypingAttributes.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/mac/WordBoundaryTypingAttributes.mm (revision 245516) >+++ Tools/TestWebKitAPI/Tests/mac/WordBoundaryTypingAttributes.mm (working copy) >@@ -61,7 +61,7 @@ TEST(WebKitLegacy, WordBoundaryTypingAtt > webView.get().frameLoadDelegate = controller.get(); > [webView.get().mainFrame loadHTMLString:testContent baseURL:[NSURL URLWithString:@"about:blank"]]; > >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > > NSDictionary *attributes = [(id)webView.get() typingAttributes]; > EXPECT_TRUE([attributes[NSUnderlineStyleAttributeName] intValue] != 0); >Index: Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.mm >=================================================================== >--- Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.mm (revision 245516) >+++ Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.mm (working copy) >@@ -84,7 +84,7 @@ - (void)waitForDidStartProvisionalNaviga > finished = true; > }; > >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > > self.didStartProvisionalNavigation = nil; > } >@@ -98,7 +98,7 @@ - (void)waitForDidFinishNavigation > finished = true; > }; > >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > > self.didFinishNavigation = nil; > } >@@ -133,7 +133,7 @@ - (void)_test_waitForDidFinishNavigation > [self _doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeForTesting:^{ > presentationUpdateHappened = true; > }]; >- TestWebKitAPI::Util::run(&presentationUpdateHappened); >+ TestWebKitAPI::runUntil(presentationUpdateHappened); > #endif > } > >Index: Tools/TestWebKitAPI/cocoa/TestWKWebView.mm >=================================================================== >--- Tools/TestWebKitAPI/cocoa/TestWKWebView.mm (revision 245516) >+++ Tools/TestWebKitAPI/cocoa/TestWKWebView.mm (working copy) >@@ -95,7 +95,7 @@ - (BOOL)_synchronouslyExecuteEditCommand > done = true; > success = completionSuccess; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > return success; > } > >@@ -141,7 +141,7 @@ - (id)objectByEvaluatingJavaScript:(NSSt > if (error) > NSLog(@"Encountered error: %@ while evaluating script: %@", error, script); > }]; >- TestWebKitAPI::Util::run(&isWaitingForJavaScript); >+ TestWebKitAPI::runUntil(isWaitingForJavaScript); > return evalResult.autorelease(); > } > >@@ -156,7 +156,7 @@ - (id)objectByEvaluatingJavaScriptWithUs > if (error) > NSLog(@"Encountered error: %@ while evaluating script: %@", error, script); > }]; >- TestWebKitAPI::Util::run(&isWaitingForJavaScript); >+ TestWebKitAPI::runUntil(isWaitingForJavaScript); > return evalResult.autorelease(); > } > >@@ -382,7 +382,7 @@ - (void)waitForMessage:(NSString *)messa > { > isDoneWaiting = true; > }]; >- TestWebKitAPI::Util::run(&isDoneWaiting); >+ TestWebKitAPI::runUntil(isDoneWaiting); > } > > - (void)performAfterLoading:(dispatch_block_t)actions { >@@ -404,7 +404,7 @@ - (void)waitForNextPresentationUpdate > done = true; > }]; > >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > } > > - (NSString *)stylePropertyAtSelectionStart:(NSString *)propertyName >@@ -485,7 +485,7 @@ - (RetainPtr<NSArray>)selectionRectsAfte > isDone = true; > }]; > >- TestWebKitAPI::Util::run(&isDone); >+ TestWebKitAPI::runUntil(isDone); > return selectionRects; > } > >@@ -514,7 +514,7 @@ - (_WKActivatedElementInfo *)activatedEl > finished = true; > }]; > >- TestWebKitAPI::Util::run(&finished); >+ TestWebKitAPI::runUntil(finished); > return info.autorelease(); > } > >Index: Tools/TestWebKitAPI/cocoa/UtilitiesCocoa.mm >=================================================================== >--- Tools/TestWebKitAPI/cocoa/UtilitiesCocoa.mm (revision 245516) >+++ Tools/TestWebKitAPI/cocoa/UtilitiesCocoa.mm (working copy) >@@ -27,14 +27,15 @@ > #include "Utilities.h" > > namespace TestWebKitAPI { >-namespace Util { > >-void run(bool* done) >+void runUntil(const bool& done) > { >- while (!*done) >+ while (!done) > [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; > } > >+namespace Util { >+ > void spinRunLoop(uint64_t count) > { > for (uint64_t i = 0; i < count; ++i) >Index: Tools/TestWebKitAPI/generic/UtilitiesGeneric.cpp >=================================================================== >--- Tools/TestWebKitAPI/generic/UtilitiesGeneric.cpp (revision 245516) >+++ Tools/TestWebKitAPI/generic/UtilitiesGeneric.cpp (working copy) >@@ -29,14 +29,15 @@ > #include <wtf/RunLoop.h> > > namespace TestWebKitAPI { >-namespace Util { > >-void run(bool* done) >+void runUntil(const bool& done) > { >- while (!*done) >+ while (!done) > WTF::RunLoop::iterate(); > } > >+namespace Util { >+ > void spinRunLoop(uint64_t count) > { > while (count > 0) { >Index: Tools/TestWebKitAPI/glib/UtilitiesGLib.cpp >=================================================================== >--- Tools/TestWebKitAPI/glib/UtilitiesGLib.cpp (revision 245516) >+++ Tools/TestWebKitAPI/glib/UtilitiesGLib.cpp (working copy) >@@ -30,9 +30,8 @@ > #include <wtf/RunLoop.h> > > namespace TestWebKitAPI { >-namespace Util { > >-void run(bool* done) >+void runUntil(const bool& done) > { > g_idle_add([](gpointer userData) -> gboolean { > bool* done = static_cast<bool*>(userData); >@@ -40,10 +39,12 @@ void run(bool* done) > RunLoop::current().stop(); > > return !*done; >- }, done); >+ }, &const_cast<bool&>(done)); > RunLoop::run(); > } > >+namespace Util { >+ > void spinRunLoop(uint64_t count) > { > g_idle_add([](gpointer userData) -> gboolean { >Index: Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm >=================================================================== >--- Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm (revision 245516) >+++ Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm (working copy) >@@ -453,7 +453,7 @@ - (void)runFrom:(CGPoint)startLocation t > }]; > } > >- Util::run(&_isDoneWithCurrentRun); >+ runUntil(_isDoneWithCurrentRun); > [_webView clearMessageHandlers:dragAndDropEventNames()]; > _finalSelectionRects = [_webView selectionRectsAfterPresentationUpdate]; > >@@ -651,7 +651,7 @@ - (CGRect)lastKnownDragCaretRect > > - (void)ensureInputSession > { >- Util::run(&_hasStartedInputSession); >+ runUntil(_hasStartedInputSession); > } > > - (NSArray<_WKAttachment *> *)insertedAttachments >Index: Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm >=================================================================== >--- Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm (revision 245516) >+++ Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm (working copy) >@@ -75,7 +75,7 @@ - (void)waitForPendingMouseEvents > [self _doAfterProcessingAllPendingMouseEvents:^{ > doneProcessMouseEvents = true; > }]; >- TestWebKitAPI::Util::run(&doneProcessMouseEvents); >+ TestWebKitAPI::runUntil(doneProcessMouseEvents); > } > > @end >@@ -172,7 +172,7 @@ - (void)runFrom:(CGPoint)flippedStartLoc > NSPoint startLocationInView = [_webView convertPoint:_startLocationInWindow fromView:nil]; > NSImage *dragImage = self.externalDragImage ?: defaultExternalDragImage(); > [self performDragInWebView:_webView.get() atLocation:startLocationInView withImage:dragImage pasteboard:pasteboard source:nil]; >- TestWebKitAPI::Util::run(&_doneWaitingForDrop); >+ TestWebKitAPI::runUntil(_doneWaitingForDrop); > return; > } > >@@ -188,12 +188,12 @@ - (void)runFrom:(CGPoint)flippedStartLoc > [_webView mouseDragToPoint:[self locationInViewForCurrentProgress]]; > [_webView waitForPendingMouseEvents]; > >- TestWebKitAPI::Util::run(&_doneWaitingForDraggingSession); >+ TestWebKitAPI::runUntil(_doneWaitingForDraggingSession); > > [_webView mouseUpAtPoint:_endLocationInWindow]; > [_webView waitForPendingMouseEvents]; > >- TestWebKitAPI::Util::run(&_doneWaitingForDrop); >+ TestWebKitAPI::runUntil(_doneWaitingForDrop); > } > > - (void)beginDraggingSessionInWebView:(DragAndDropTestWKWebView *)webView withItems:(NSArray<NSDraggingItem *> *)items source:(id<NSDraggingSource>)source >@@ -443,7 +443,7 @@ - (NSArray<NSURL *> *)receivePromisedFil > [provider.delegate filePromiseProvider:provider writePromiseToURL:destinationURL completionHandler:^(NSError *) { > done = true; > }]; >- TestWebKitAPI::Util::run(&done); >+ TestWebKitAPI::runUntil(done); > [destinationURLs addObject:destinationURL]; > [_filePromiseDestinationURLs addObject:destinationURL]; > } >Index: Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm >=================================================================== >--- Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm (revision 245516) >+++ Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm (working copy) >@@ -142,7 +142,7 @@ void WebKitAgnosticTest::goBack(WKView * > > void WebKitAgnosticTest::waitForLoadToFinish() > { >- Util::run(&didFinishLoad); >+ runUntil(didFinishLoad); > didFinishLoad = false; > } > >@@ -153,7 +153,7 @@ void WebKitAgnosticTest::waitForNextPres > dispatch_async(dispatch_get_main_queue(), ^() { > done = true; > }); >- Util::run(&done); >+ runUntil(done); > } > > void WebKitAgnosticTest::waitForNextPresentationUpdate(WKView *view) >@@ -162,7 +162,7 @@ void WebKitAgnosticTest::waitForNextPres > [view _doAfterNextPresentationUpdate:^() { > done = true; > }]; >- Util::run(&done); >+ runUntil(done); > } > > } // namespace TestWebKitAPI >Index: Tools/TestWebKitAPI/win/UtilitiesWin.cpp >=================================================================== >--- Tools/TestWebKitAPI/win/UtilitiesWin.cpp (revision 245516) >+++ Tools/TestWebKitAPI/win/UtilitiesWin.cpp (working copy) >@@ -29,11 +29,10 @@ > #include <wtf/RunLoop.h> > > namespace TestWebKitAPI { >-namespace Util { > >-void run(bool* done) >+void runUntil(const bool& done) > { >- while (!*done) { >+ while (!done) { > MSG message; > BOOL result = GetMessage(&message, 0, 0, 0); > if (!result) >@@ -43,6 +42,8 @@ void run(bool* done) > } > } > >+namespace Util { >+ > void spinRunLoop(uint64_t count) > { > for (uint64_t i = 0; i < count; i++) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198044
:
370260
| 370261