[Win] Some tests are flaky because certain DLLs are writing to stdout.
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jan 2017 12:46:34 +0000 (12:46 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jan 2017 12:46:34 +0000 (12:46 +0000)
commit3d3537383ff62a0c6da33cada6d8e73e783f3489
treeb53f34b520f03707a7a324b64a985aa085d01c34
parent459f6c6ecc9bf03cce84ce5f157282ea9f7eaa8c
[Win] Some tests are flaky because certain DLLs are writing to stdout.
https://bugs.webkit.org/show_bug.cgi?id=166760

Reviewed by Darin Adler.

Some tests are flaky because certain DLLs are writing to stdout, giving incorrect test results.
We can work around that by duplicating and redirecting stdout.

* DumpRenderTree/PixelDumpSupport.cpp:
(dumpWebViewAsPixelsAndCompareWithExpected):
(printPNG):
* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(logEventProc):
* DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp:
(DRTDesktopNotificationPresenter::showDesktopNotification):
(DRTDesktopNotificationPresenter::cancelDesktopNotification):
(DRTDesktopNotificationPresenter::requestNotificationPermission):
* DumpRenderTree/win/DumpRenderTree.cpp:
(dumpFrameScrollPosition):
(dumpHistoryItem):
(dumpBackForwardList):
(dump):
(runTest):
(main):
* DumpRenderTree/win/DumpRenderTreeWin.h:
* DumpRenderTree/win/EditingDelegate.cpp:
(EditingDelegate::shouldBeginEditingInDOMRange):
(EditingDelegate::shouldEndEditingInDOMRange):
(EditingDelegate::shouldInsertNode):
(EditingDelegate::shouldInsertText):
(EditingDelegate::shouldDeleteDOMRange):
(EditingDelegate::shouldChangeSelectedDOMRange):
(EditingDelegate::shouldApplyStyle):
(EditingDelegate::shouldChangeTypingStyle):
(EditingDelegate::doPlatformCommand):
(EditingDelegate::webViewDidBeginEditing):
(EditingDelegate::webViewDidChange):
(EditingDelegate::webViewDidEndEditing):
(EditingDelegate::webViewDidChangeTypingStyle):
(EditingDelegate::webViewDidChangeSelection):
* DumpRenderTree/win/FrameLoadDelegate.cpp:
(FrameLoadDelegate::didStartProvisionalLoadForFrame):
(FrameLoadDelegate::didReceiveServerRedirectForProvisionalLoadForFrame):
(FrameLoadDelegate::didChangeLocationWithinPageForFrame):
(FrameLoadDelegate::didFailProvisionalLoadWithError):
(FrameLoadDelegate::didCommitLoadForFrame):
(FrameLoadDelegate::didReceiveTitle):
(FrameLoadDelegate::didFinishLoadForFrame):
(FrameLoadDelegate::didFailLoadWithError):
(FrameLoadDelegate::willPerformClientRedirectToURL):
(FrameLoadDelegate::didCancelClientRedirectForFrame):
(FrameLoadDelegate::windowScriptObjectAvailable):
(FrameLoadDelegate::didFinishDocumentLoadForFrame):
(FrameLoadDelegate::didHandleOnloadEventsForFrame):
(FrameLoadDelegate::didDisplayInsecureContent):
(FrameLoadDelegate::didRunInsecureContent):
(FrameLoadDelegate::webViewProgressFinishedNotification):
* DumpRenderTree/win/HistoryDelegate.cpp:
(HistoryDelegate::didNavigateWithNavigationData):
(HistoryDelegate::didPerformClientRedirectFromURL):
(HistoryDelegate::didPerformServerRedirectFromURL):
(HistoryDelegate::updateHistoryTitle):
(HistoryDelegate::populateVisitedLinksForWebView):
* DumpRenderTree/win/PolicyDelegate.cpp:
(PolicyDelegate::decidePolicyForNavigationAction):
(PolicyDelegate::unableToImplementPolicyWithError):
* DumpRenderTree/win/ResourceLoadDelegate.cpp:
(ResourceLoadDelegate::willSendRequest):
(ResourceLoadDelegate::didReceiveAuthenticationChallenge):
(ResourceLoadDelegate::didReceiveResponse):
(ResourceLoadDelegate::didFinishLoadingFromDataSource):
(ResourceLoadDelegate::didFailLoadingWithError):
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::addDisallowedURL):
(TestRunner::originsWithApplicationCache):
(TestRunner::setStorageDatabaseIdleInterval):
(TestRunner::closeIdleLocalStorageDatabases):
(TestRunner::copyDecodedHostName):
(TestRunner::copyEncodedHostName):
(TestRunner::numberOfPendingGeolocationPermissionRequests):
(TestRunner::isGeolocationProviderActive):
(TestRunner::pathToLocalResource):
(TestRunner::setMockDeviceOrientation):
(TestRunner::setMockGeolocationPosition):
(TestRunner::setMockGeolocationPositionUnavailableError):
(TestRunner::setSpatialNavigationEnabled):
(TestRunner::setAutomaticLinkDetectionEnabled):
(TestRunner::isCommandEnabled):
(TestRunner::authenticateSession):
(TestRunner::addChromeInputField):
(TestRunner::removeChromeInputField):
(TestRunner::focusWebView):
(TestRunner::grantWebNotificationPermission):
(TestRunner::denyWebNotificationPermission):
(TestRunner::removeAllWebNotificationPermissions):
(TestRunner::simulateWebNotificationClick):
(TestRunner::imageCountInGeneralPasteboard):
* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::runJavaScriptAlertPanelWithMessage):
(UIDelegate::runJavaScriptConfirmPanelWithMessage):
(UIDelegate::runJavaScriptTextInputPanelWithPrompt):
(UIDelegate::runBeforeUnloadConfirmPanelWithMessage):
(UIDelegate::webViewAddMessageToConsole):
(UIDelegate::exceededDatabaseQuota):
(UIDelegate::setStatusText):
(UIDelegate::didPressMissingPluginButton):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Tools/ChangeLog
Tools/DumpRenderTree/PixelDumpSupport.cpp
Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp
Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/DumpRenderTree/win/DumpRenderTreeWin.h
Tools/DumpRenderTree/win/EditingDelegate.cpp
Tools/DumpRenderTree/win/FrameLoadDelegate.cpp
Tools/DumpRenderTree/win/HistoryDelegate.cpp
Tools/DumpRenderTree/win/PolicyDelegate.cpp
Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp
Tools/DumpRenderTree/win/TestRunnerWin.cpp
Tools/DumpRenderTree/win/UIDelegate.cpp