<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[210503] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/210503">210503</a></dd>
<dt>Author</dt> <dd>pvollan@apple.com</dd>
<dt>Date</dt> <dd>2017-01-09 04:46:34 -0800 (Mon, 09 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[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):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreePixelDumpSupportcpp">trunk/Tools/DumpRenderTree/PixelDumpSupport.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinAccessibilityControllerWincpp">trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinDRTDesktopNotificationPresentercpp">trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinDumpRenderTreecpp">trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinDumpRenderTreeWinh">trunk/Tools/DumpRenderTree/win/DumpRenderTreeWin.h</a></li>
<li><a href="#trunkToolsDumpRenderTreewinEditingDelegatecpp">trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinFrameLoadDelegatecpp">trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinHistoryDelegatecpp">trunk/Tools/DumpRenderTree/win/HistoryDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinPolicyDelegatecpp">trunk/Tools/DumpRenderTree/win/PolicyDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinResourceLoadDelegatecpp">trunk/Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinTestRunnerWincpp">trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinUIDelegatecpp">trunk/Tools/DumpRenderTree/win/UIDelegate.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/ChangeLog        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -1,3 +1,112 @@
</span><ins>+2017-01-06  Per Arne Vollan  &lt;pvollan@apple.com&gt;
+
+        [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):
+
</ins><span class="cx"> 2017-01-07  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a setting to create editable MiniBrowser windows by default
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreePixelDumpSupportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/PixelDumpSupport.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/PixelDumpSupport.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/PixelDumpSupport.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -43,6 +43,10 @@
</span><span class="cx"> #include &quot;PixelDumpSupportCairo.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(WIN)
+#define testResult stdout
+#endif
+
</ins><span class="cx"> void dumpWebViewAsPixelsAndCompareWithExpected(const std::string&amp; expectedHash)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;BitmapContext&gt; context;
</span><span class="lines">@@ -57,7 +61,7 @@
</span><span class="cx">     // Compute the hash of the bitmap context pixels
</span><span class="cx">     char actualHash[33];
</span><span class="cx">     computeMD5HashStringForBitmapContext(context.get(), actualHash);
</span><del>-    printf(&quot;\nActualHash: %s\n&quot;, actualHash); // FIXME: No need for the leading newline.
</del><ins>+    fprintf(testResult, &quot;\nActualHash: %s\n&quot;, actualHash); // FIXME: No need for the leading newline.
</ins><span class="cx"> 
</span><span class="cx">     // Check the computed hash against the expected one and dump image on mismatch
</span><span class="cx">     bool dumpImage = true;
</span><span class="lines">@@ -64,7 +68,7 @@
</span><span class="cx">     if (expectedHash.length() &gt; 0) {
</span><span class="cx">         ASSERT(expectedHash.length() == 32);
</span><span class="cx"> 
</span><del>-        printf(&quot;\nExpectedHash: %s\n&quot;, expectedHash.c_str()); // FIXME: No need for the leading newline.
</del><ins>+        fprintf(testResult, &quot;\nExpectedHash: %s\n&quot;, expectedHash.c_str()); // FIXME: No need for the leading newline.
</ins><span class="cx">         
</span><span class="cx">         if (expectedHash == actualHash) // FIXME: do case insensitive compare
</span><span class="cx">             dumpImage = false;
</span><span class="lines">@@ -114,13 +118,13 @@
</span><span class="cx">     Vector&lt;unsigned char&gt; bytesToAdd;
</span><span class="cx">     convertChecksumToPNGComment(checksum, bytesToAdd);
</span><span class="cx"> 
</span><del>-    printf(&quot;Content-Type: %s\n&quot;, &quot;image/png&quot;);
-    printf(&quot;Content-Length: %lu\n&quot;, static_cast&lt;unsigned long&gt;(dataLength + bytesToAdd.size()));
</del><ins>+    fprintf(testResult, &quot;Content-Type: image/png\n&quot;);
+    fprintf(testResult, &quot;Content-Length: %lu\n&quot;, static_cast&lt;unsigned long&gt;(dataLength + bytesToAdd.size()));
</ins><span class="cx"> 
</span><span class="cx">     size_t insertOffset = offsetAfterIHDRChunk(data, dataLength);
</span><span class="cx"> 
</span><del>-    fwrite(data, 1, insertOffset, stdout);
-    fwrite(bytesToAdd.data(), 1, bytesToAdd.size(), stdout);
</del><ins>+    fwrite(data, 1, insertOffset, testResult);
+    fwrite(bytesToAdd.data(), 1, bytesToAdd.size(), testResult);
</ins><span class="cx"> 
</span><span class="cx">     const size_t bytesToWriteInOneChunk = 1 &lt;&lt; 15;
</span><span class="cx">     data += insertOffset;
</span><span class="lines">@@ -127,7 +131,7 @@
</span><span class="cx">     size_t dataRemainingToWrite = dataLength - insertOffset;
</span><span class="cx">     while (dataRemainingToWrite) {
</span><span class="cx">         size_t bytesToWriteInThisChunk = std::min(dataRemainingToWrite, bytesToWriteInOneChunk);
</span><del>-        size_t bytesWritten = fwrite(data, 1, bytesToWriteInThisChunk, stdout);
</del><ins>+        size_t bytesWritten = fwrite(data, 1, bytesToWriteInThisChunk, testResult);
</ins><span class="cx">         if (bytesWritten != bytesToWriteInThisChunk)
</span><span class="cx">             break;
</span><span class="cx">         dataRemainingToWrite -= bytesWritten;
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinAccessibilityControllerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -192,11 +192,11 @@
</span><span class="cx"> 
</span><span class="cx">     switch (event) {
</span><span class="cx">         case EVENT_OBJECT_FOCUS:
</span><del>-            printf(&quot;Received focus event for object '%S'.\n&quot;, name.c_str());
</del><ins>+            fprintf(testResult, &quot;Received focus event for object '%S'.\n&quot;, name.c_str());
</ins><span class="cx">             break;
</span><span class="cx"> 
</span><span class="cx">         case EVENT_OBJECT_SELECTION:
</span><del>-            printf(&quot;Received selection event for object '%S'.\n&quot;, name.c_str());
</del><ins>+            fprintf(testResult, &quot;Received selection event for object '%S'.\n&quot;, name.c_str());
</ins><span class="cx">             break;
</span><span class="cx"> 
</span><span class="cx">         case EVENT_OBJECT_VALUECHANGE: {
</span><span class="lines">@@ -205,16 +205,16 @@
</span><span class="cx">             ASSERT(SUCCEEDED(hr));
</span><span class="cx">             wstring value(valueBSTR, valueBSTR.length());
</span><span class="cx"> 
</span><del>-            printf(&quot;Received value change event for object '%S', value '%S'.\n&quot;, name.c_str(), value.c_str());
</del><ins>+            fprintf(testResult, &quot;Received value change event for object '%S', value '%S'.\n&quot;, name.c_str(), value.c_str());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         case EVENT_SYSTEM_SCROLLINGSTART:
</span><del>-            printf(&quot;Received scrolling start event for object '%S'.\n&quot;, name.c_str());
</del><ins>+            fprintf(testResult, &quot;Received scrolling start event for object '%S'.\n&quot;, name.c_str());
</ins><span class="cx">             break;
</span><span class="cx"> 
</span><span class="cx">         default:
</span><del>-            printf(&quot;Received unknown event for object '%S'.\n&quot;, name.c_str());
</del><ins>+            fprintf(testResult, &quot;Received unknown event for object '%S'.\n&quot;, name.c_str());
</ins><span class="cx">             break;
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinDRTDesktopNotificationPresentercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -80,12 +80,12 @@
</span><span class="cx"> 
</span><span class="cx">     if (SUCCEEDED(notification-&gt;isHTML(&amp;html)) &amp;&amp; html) {
</span><span class="cx">         notification-&gt;contentsURL(&amp;url.GetBSTR());    
</span><del>-        printf(&quot;DESKTOP NOTIFICATION: contents at %S\n&quot;, static_cast&lt;wchar_t*&gt;(url));
</del><ins>+        fprintf(testResult, &quot;DESKTOP NOTIFICATION: contents at %S\n&quot;, static_cast&lt;wchar_t*&gt;(url));
</ins><span class="cx">     } else {
</span><span class="cx">         notification-&gt;iconURL(&amp;url.GetBSTR());
</span><span class="cx">         notification-&gt;title(&amp;title.GetBSTR());
</span><span class="cx">         notification-&gt;text(&amp;text.GetBSTR());
</span><del>-        printf(&quot;DESKTOP NOTIFICATION: icon %S, title %S, text %S\n&quot;, static_cast&lt;wchar_t*&gt;(url), static_cast&lt;wchar_t*&gt;(title), static_cast&lt;wchar_t*&gt;(text));
</del><ins>+        fprintf(testResult, &quot;DESKTOP NOTIFICATION: icon %S, title %S, text %S\n&quot;, static_cast&lt;wchar_t*&gt;(url), static_cast&lt;wchar_t*&gt;(title), static_cast&lt;wchar_t*&gt;(text));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // In this stub implementation, the notification is displayed immediately;
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx">     else
</span><span class="cx">         notification-&gt;title(&amp;identifier.GetBSTR());
</span><span class="cx"> 
</span><del>-    printf(&quot;DESKTOP NOTIFICATION CLOSED: %S\n&quot;, static_cast&lt;wchar_t*&gt;(identifier));
</del><ins>+    fprintf(testResult, &quot;DESKTOP NOTIFICATION CLOSED: %S\n&quot;, static_cast&lt;wchar_t*&gt;(identifier));
</ins><span class="cx">     notification-&gt;notifyClose(false);
</span><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -141,6 +141,6 @@
</span><span class="cx"> 
</span><span class="cx"> HRESULT DRTDesktopNotificationPresenter::requestNotificationPermission(_In_ BSTR origin)
</span><span class="cx"> {
</span><del>-    printf(&quot;DESKTOP NOTIFICATION PERMISSION REQUESTED: %S\n&quot;, origin ? origin : L&quot;&quot;);
</del><ins>+    fprintf(testResult, &quot;DESKTOP NOTIFICATION PERMISSION REQUESTED: %S\n&quot;, origin ? origin : L&quot;&quot;);
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinDumpRenderTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -42,6 +42,10 @@
</span><span class="cx"> #include &quot;WorkQueueItem.h&quot;
</span><span class="cx"> #include &quot;WorkQueue.h&quot;
</span><span class="cx"> 
</span><ins>+#include &lt;CoreFoundation/CoreFoundation.h&gt;
+#include &lt;WebCore/FileSystem.h&gt;
+#include &lt;WebKit/WebKit.h&gt;
+#include &lt;WebKit/WebKitCOMAPI.h&gt;
</ins><span class="cx"> #include &lt;comutil.h&gt;
</span><span class="cx"> #include &lt;cstdio&gt;
</span><span class="cx"> #include &lt;cstring&gt;
</span><span class="lines">@@ -52,15 +56,13 @@
</span><span class="cx"> #include &lt;shlobj.h&gt;
</span><span class="cx"> #include &lt;shlwapi.h&gt;
</span><span class="cx"> #include &lt;tchar.h&gt;
</span><ins>+#include &lt;windows.h&gt;
+#include &lt;wtf/HashSet.h&gt;
</ins><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><del>-#include &lt;windows.h&gt;
-#include &lt;CoreFoundation/CoreFoundation.h&gt;
-#include &lt;WebCore/FileSystem.h&gt;
-#include &lt;WebKit/WebKit.h&gt;
-#include &lt;WebKit/WebKitCOMAPI.h&gt;
</del><ins>+#include &lt;wtf/text/StringHash.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if USE(CFURLCONNECTION)
</span><span class="cx"> #include &lt;CFNetwork/CFHTTPCookiesPriv.h&gt;
</span><span class="lines">@@ -121,6 +123,8 @@
</span><span class="cx"> 
</span><span class="cx"> UINT_PTR waitToDumpWatchdog = 0;
</span><span class="cx"> 
</span><ins>+FILE* testResult = nullptr;
+
</ins><span class="cx"> void setPersistentUserStyleSheetLocation(CFStringRef url)
</span><span class="cx"> {
</span><span class="cx">     persistentUserStyleSheetLocation = url;
</span><span class="lines">@@ -405,9 +409,9 @@
</span><span class="cx">             _bstr_t name;
</span><span class="cx">             if (FAILED(frame-&gt;name(&amp;name.GetBSTR())))
</span><span class="cx">                 return;
</span><del>-            printf(&quot;frame '%S' &quot;, static_cast&lt;wchar_t*&gt;(name));
</del><ins>+            fprintf(testResult, &quot;frame '%S' &quot;, static_cast&lt;wchar_t*&gt;(name));
</ins><span class="cx">         }
</span><del>-        printf(&quot;scrolled to %.f,%.f\n&quot;, (double)scrollPosition.cx, (double)scrollPosition.cy);
</del><ins>+        fprintf(testResult, &quot;scrolled to %.f,%.f\n&quot;, (double)scrollPosition.cx, (double)scrollPosition.cy);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpChildFrameScrollPositions()) {
</span><span class="lines">@@ -506,11 +510,11 @@
</span><span class="cx"> 
</span><span class="cx">     int start = 0;
</span><span class="cx">     if (current) {
</span><del>-        printf(&quot;curr-&gt;&quot;);
</del><ins>+        fprintf(testResult, &quot;curr-&gt;&quot;);
</ins><span class="cx">         start = 6;
</span><span class="cx">     }
</span><span class="cx">     for (int i = start; i &lt; indent; i++)
</span><del>-        putchar(' ');
</del><ins>+        fputc(' ', testResult);
</ins><span class="cx"> 
</span><span class="cx">     _bstr_t url;
</span><span class="cx">     if (FAILED(item-&gt;URLString(&amp;url.GetBSTR())))
</span><span class="lines">@@ -531,7 +535,7 @@
</span><span class="cx">         url = _bstr_t(L&quot;(file test):&quot;) + _bstr_t(start);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    printf(&quot;%S&quot;, static_cast&lt;wchar_t*&gt;(url));
</del><ins>+    fprintf(testResult, &quot;%S&quot;, static_cast&lt;wchar_t*&gt;(url));
</ins><span class="cx"> 
</span><span class="cx">     COMPtr&lt;IWebHistoryItemPrivate&gt; itemPrivate;
</span><span class="cx">     if (FAILED(item-&gt;QueryInterface(&amp;itemPrivate)))
</span><span class="lines">@@ -541,13 +545,13 @@
</span><span class="cx">     if (FAILED(itemPrivate-&gt;target(&amp;target.GetBSTR())))
</span><span class="cx">         return;
</span><span class="cx">     if (target.length())
</span><del>-        printf(&quot; (in frame \&quot;%S\&quot;)&quot;, static_cast&lt;wchar_t*&gt;(target));
</del><ins>+        fprintf(testResult, &quot; (in frame \&quot;%S\&quot;)&quot;, static_cast&lt;wchar_t*&gt;(target));
</ins><span class="cx">     BOOL isTargetItem = FALSE;
</span><span class="cx">     if (FAILED(itemPrivate-&gt;isTargetItem(&amp;isTargetItem)))
</span><span class="cx">         return;
</span><span class="cx">     if (isTargetItem)
</span><del>-        printf(&quot;  **nav target**&quot;);
-    putchar('\n');
</del><ins>+        fprintf(testResult, &quot;  **nav target**&quot;);
+    fputc('\n', testResult);
</ins><span class="cx"> 
</span><span class="cx">     unsigned kidsCount;
</span><span class="cx">     SAFEARRAY* arrPtr;
</span><span class="lines">@@ -595,7 +599,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(webView);
</span><span class="cx"> 
</span><del>-    printf(&quot;\n============== Back Forward List ==============\n&quot;);
</del><ins>+    fprintf(testResult, &quot;\n============== Back Forward List ==============\n&quot;);
</ins><span class="cx"> 
</span><span class="cx">     COMPtr&lt;IWebBackForwardList&gt; bfList;
</span><span class="cx">     if (FAILED(webView-&gt;backForwardList(&amp;bfList)))
</span><span class="lines">@@ -652,7 +656,7 @@
</span><span class="cx">         dumpHistoryItem(historyItemToPrint.get(), 8, i == currentItemIndex);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    printf(&quot;===============================================\n&quot;);
</del><ins>+    fprintf(testResult, &quot;===============================================\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void dumpBackForwardListForAllWindows()
</span><span class="lines">@@ -711,7 +715,7 @@
</span><span class="cx">             int bufferSize = ::WideCharToMultiByte(CP_UTF8, 0, resultString, stringLength, 0, 0, 0, 0);
</span><span class="cx">             char* buffer = (char*)malloc(bufferSize + 1);
</span><span class="cx">             ::WideCharToMultiByte(CP_UTF8, 0, resultString, stringLength, buffer, bufferSize + 1, 0, 0);
</span><del>-            fwrite(buffer, 1, bufferSize, stdout);
</del><ins>+            fwrite(buffer, 1, bufferSize, testResult);
</ins><span class="cx">             free(buffer);
</span><span class="cx"> 
</span><span class="cx">             if (!::gTestRunner-&gt;dumpAsText() &amp;&amp; !::gTestRunner-&gt;dumpDOMAsWebArchive() &amp;&amp; !::gTestRunner-&gt;dumpSourceAsWebArchive() &amp;&amp; !::gTestRunner-&gt;dumpAsAudio())
</span><span class="lines">@@ -720,10 +724,10 @@
</span><span class="cx">             if (::gTestRunner-&gt;dumpBackForwardList())
</span><span class="cx">                 dumpBackForwardListForAllWindows();
</span><span class="cx">         } else
</span><del>-            printf(&quot;ERROR: nil result from %s&quot;, ::gTestRunner-&gt;dumpAsText() ? &quot;IDOMElement::innerText&quot; : &quot;IFrameViewPrivate::renderTreeAsExternalRepresentation&quot;);
</del><ins>+            fprintf(testResult, &quot;ERROR: nil result from %s&quot;, ::gTestRunner-&gt;dumpAsText() ? &quot;IDOMElement::innerText&quot; : &quot;IFrameViewPrivate::renderTreeAsExternalRepresentation&quot;);
</ins><span class="cx"> 
</span><span class="cx">         if (printSeparators)
</span><del>-            puts(&quot;#EOF&quot;); // terminate the content block
</del><ins>+            fputs(&quot;#EOF\n&quot;, testResult); // terminate the content block
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (dumpPixelsForCurrentTest &amp;&amp; ::gTestRunner-&gt;generatePixelResults()) {
</span><span class="lines">@@ -731,8 +735,8 @@
</span><span class="cx">         dumpWebViewAsPixelsAndCompareWithExpected(gTestRunner-&gt;expectedPixelHash());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    puts(&quot;#EOF&quot;);   // terminate the (possibly empty) pixels block
-    fflush(stdout);
</del><ins>+    fputs(&quot;#EOF\n&quot;, testResult); // terminate the (possibly empty) pixels block
+    fflush(testResult);
</ins><span class="cx"> 
</span><span class="cx"> fail:
</span><span class="cx">     // This will exit from our message loop.
</span><span class="lines">@@ -1110,6 +1114,12 @@
</span><span class="cx">     _bstr_t urlBStr(reinterpret_cast&lt;wchar_t*&gt;(buffer.data()));
</span><span class="cx">     ASSERT(urlBStr.length() == length);
</span><span class="cx"> 
</span><ins>+    // Check that test has not already run
+    static HashSet&lt;String&gt; testUrls;
+    if (testUrls.contains(String(inputLine.c_str())))
+        fprintf(stderr, &quot;Test has already run \&quot;%s\&quot;\n&quot;, inputLine.c_str());
+    testUrls.add(String(inputLine.c_str()));
+
</ins><span class="cx">     CFIndex maximumURLLengthAsUTF8 = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8) + 1;
</span><span class="cx">     Vector&lt;char&gt; testURL(maximumURLLengthAsUTF8 + 1, 0);
</span><span class="cx">     CFStringGetCString(str, testURL.data(), maximumURLLengthAsUTF8, kCFStringEncodingUTF8);
</span><span class="lines">@@ -1455,6 +1465,14 @@
</span><span class="cx">     _setmode(1, _O_BINARY);
</span><span class="cx">     _setmode(2, _O_BINARY);
</span><span class="cx"> 
</span><ins>+    // Some tests are flaky because certain DLLs are writing to stdout, giving incorrect test results.
+    // We work around that here by duplicating and redirecting stdout.
+    int fdStdout = _dup(1);
+    _setmode(fdStdout, _O_BINARY);
+    testResult = fdopen(fdStdout, &quot;a+b&quot;);
+    // Redirect stdout to stderr.
+    int result = _dup2(_fileno(stderr), 1);
+
</ins><span class="cx">     initialize();
</span><span class="cx"> 
</span><span class="cx">     setDefaultsToConsistentValuesForTesting();
</span><span class="lines">@@ -1487,7 +1505,7 @@
</span><span class="cx">         BOOL threeDTransformsAvailable = FALSE;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        printf(&quot;SupportedFeatures:%s %s\n&quot;, acceleratedCompositingAvailable ? &quot;AcceleratedCompositing&quot; : &quot;&quot;, threeDTransformsAvailable ? &quot;3DTransforms&quot; : &quot;&quot;);
</del><ins>+        fprintf(testResult, &quot;SupportedFeatures:%s %s\n&quot;, acceleratedCompositingAvailable ? &quot;AcceleratedCompositing&quot; : &quot;&quot;, threeDTransformsAvailable ? &quot;3DTransforms&quot; : &quot;&quot;);
</ins><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinDumpRenderTreeWinh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTreeWin.h (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/DumpRenderTreeWin.h        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTreeWin.h        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -43,6 +43,8 @@
</span><span class="cx"> 
</span><span class="cx"> extern HWND webViewWindow;
</span><span class="cx"> 
</span><ins>+extern FILE* testResult;
+
</ins><span class="cx"> #include &lt;WebCore/COMPtr.h&gt;
</span><span class="cx"> #include &lt;string&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinEditingDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        printf(&quot;EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n&quot;, dump(range).c_str());
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n&quot;, dump(range).c_str());
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        printf(&quot;EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n&quot;, dump(range).c_str());
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n&quot;, dump(range).c_str());
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">         return E_POINTER;
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        printf(&quot;EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n&quot;, dumpPath(node).c_str(), dump(range).c_str(), insertActionString[action]);
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n&quot;, dumpPath(node).c_str(), dump(range).c_str(), insertActionString[action]);
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t textBstr(text);
</span><del>-        printf(&quot;EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n&quot;, static_cast&lt;const char*&gt;(textBstr), dump(range).c_str(), insertactionstring[action]);
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n&quot;, static_cast&lt;const char*&gt;(textBstr), dump(range).c_str(), insertactionstring[action]);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        printf(&quot;EDITING DELEGATE: shouldDeleteDOMRange:%s\n&quot;, dump(range).c_str());
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: shouldDeleteDOMRange:%s\n&quot;, dump(range).c_str());
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -232,7 +232,7 @@
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        printf(&quot;EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n&quot;, dump(currentRange).c_str(), dump(proposedRange).c_str(), affinityString[selectionAffinity], boolstring[stillSelecting]);
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n&quot;, dump(currentRange).c_str(), dump(proposedRange).c_str(), affinityString[selectionAffinity], boolstring[stillSelecting]);
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -246,7 +246,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        printf(&quot;EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n&quot;, &quot;'style description'&quot;/*[[style description] UTF8String]*/, dump(range).c_str());
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n&quot;, &quot;'style description'&quot;/*[[style description] UTF8String]*/, dump(range).c_str());
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -261,7 +261,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        printf(&quot;EDITING DELEGATE: shouldChangeTypingStyle:%s toStyle:%s\n&quot;, &quot;'currentStyle description'&quot;, &quot;'proposedStyle description'&quot;);
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: shouldChangeTypingStyle:%s toStyle:%s\n&quot;, &quot;'currentStyle description'&quot;, &quot;'proposedStyle description'&quot;);
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -276,7 +276,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t commandBSTR(command);
</span><del>-        printf(&quot;EDITING DELEGATE: doPlatformCommand:%s\n&quot;, static_cast&lt;const char*&gt;(commandBSTR));
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: doPlatformCommand:%s\n&quot;, static_cast&lt;const char*&gt;(commandBSTR));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="lines">@@ -291,7 +291,7 @@
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t name;
</span><span class="cx">         notification-&gt;name(&amp;name.GetBSTR());
</span><del>-        printf(&quot;EDITING DELEGATE: webViewDidBeginEditing:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: webViewDidBeginEditing:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</ins><span class="cx">     }
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t name;
</span><span class="cx">         notification-&gt;name(&amp;name.GetBSTR());
</span><del>-        printf(&quot;EDITING DELEGATE: webViewDidChange:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: webViewDidChange:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</ins><span class="cx">     }
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t name;
</span><span class="cx">         notification-&gt;name(&amp;name.GetBSTR());
</span><del>-        printf(&quot;EDITING DELEGATE: webViewDidEndEditing:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: webViewDidEndEditing:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</ins><span class="cx">     }
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t name;
</span><span class="cx">         notification-&gt;name(&amp;name.GetBSTR());
</span><del>-        printf(&quot;EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</ins><span class="cx">     }
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -343,7 +343,7 @@
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t name;
</span><span class="cx">         notification-&gt;name(&amp;name.GetBSTR());
</span><del>-        printf(&quot;EDITING DELEGATE: webViewDidChangeSelection:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</del><ins>+        fprintf(testResult, &quot;EDITING DELEGATE: webViewDidChangeSelection:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</ins><span class="cx">     }
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinFrameLoadDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didStartProvisionalLoadForFrame(_In_opt_ IWebView*, _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didStartProvisionalLoadForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</del><ins>+        fprintf(testResult, &quot;%s - didStartProvisionalLoadForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</ins><span class="cx"> 
</span><span class="cx">     // Make sure we only set this once per test.  If it gets cleared, and then set again, we might
</span><span class="cx">     // end up doing two dumps for one test.
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didReceiveServerRedirectForProvisionalLoadForFrame(_In_opt_ IWebView*, _In_opt_ IWebFrame* frame)
</span><span class="cx"> { 
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didReceiveServerRedirectForProvisionalLoadForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</del><ins>+        fprintf(testResult, &quot;%s - didReceiveServerRedirectForProvisionalLoadForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</ins><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didChangeLocationWithinPageForFrame(_In_opt_ IWebView* , _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didChangeLocationWithinPageForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</del><ins>+        fprintf(testResult, &quot;%s - didChangeLocationWithinPageForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</ins><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didFailProvisionalLoadWithError(_In_opt_ IWebView*, _In_opt_ IWebError* error, _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didFailProvisionalLoadWithError\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</del><ins>+        fprintf(testResult, &quot;%s - didFailProvisionalLoadWithError\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</ins><span class="cx"> 
</span><span class="cx">     locationChangeDone(error, frame);
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didCommitLoadForFrame(_In_opt_ IWebView* webView, _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didCommitLoadForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</del><ins>+        fprintf(testResult, &quot;%s - didCommitLoadForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</ins><span class="cx"> 
</span><span class="cx">     COMPtr&lt;IWebViewPrivate2&gt; webViewPrivate;
</span><span class="cx">     HRESULT hr = webView-&gt;QueryInterface(&amp;webViewPrivate);
</span><span class="lines">@@ -175,10 +175,10 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didReceiveTitle(_In_opt_ IWebView*, _In_ BSTR title, _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didReceiveTitle: %S\n&quot;, descriptionSuitableForTestResult(frame).c_str(), title);
</del><ins>+        fprintf(testResult, &quot;%s - didReceiveTitle: %S\n&quot;, descriptionSuitableForTestResult(frame).c_str(), title);
</ins><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpTitleChanges() &amp;&amp; !done)
</span><del>-        printf(&quot;TITLE CHANGED: '%S'\n&quot;, title ? title : L&quot;&quot;);
</del><ins>+        fprintf(testResult, &quot;TITLE CHANGED: '%S'\n&quot;, title ? title : L&quot;&quot;);
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didFinishLoadForFrame(_In_opt_ IWebView*, _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didFinishLoadForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</del><ins>+        fprintf(testResult, &quot;%s - didFinishLoadForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</ins><span class="cx"> 
</span><span class="cx">     locationChangeDone(0, frame);
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -261,7 +261,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didFailLoadWithError(_In_opt_ IWebView*, _In_opt_ IWebError* error, _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didFailLoadWithError\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</del><ins>+        fprintf(testResult, &quot;%s - didFailLoadWithError\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</ins><span class="cx"> 
</span><span class="cx">     locationChangeDone(error, frame);
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -270,7 +270,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::willPerformClientRedirectToURL(_In_opt_ IWebView*, _In_ BSTR url, double /*delaySeconds*/, DATE /*fireDate*/, _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - willPerformClientRedirectToURL: %S \n&quot;, descriptionSuitableForTestResult(frame).c_str(),
</del><ins>+        fprintf(testResult, &quot;%s - willPerformClientRedirectToURL: %S \n&quot;, descriptionSuitableForTestResult(frame).c_str(),
</ins><span class="cx">                 urlSuitableForTestResult(std::wstring(url, ::SysStringLen(url))).c_str());
</span><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -279,7 +279,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didCancelClientRedirectForFrame(_In_opt_ IWebView*, _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didCancelClientRedirectForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</del><ins>+        fprintf(testResult, &quot;%s - didCancelClientRedirectForFrame\n&quot;, descriptionSuitableForTestResult(frame).c_str());
</ins><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -293,7 +293,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::windowScriptObjectAvailable(IWebView*, JSContextRef, JSObjectRef)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;?? - windowScriptObjectAvailable\n&quot;);
</del><ins>+        fprintf(testResult, &quot;?? - windowScriptObjectAvailable\n&quot;);
</ins><span class="cx"> 
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="cx"> 
</span><span class="lines">@@ -375,7 +375,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didFinishDocumentLoadForFrame(_In_opt_ IWebView* /*sender*/, _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didFinishDocumentLoadForFrame\n&quot;,
</del><ins>+        fprintf(testResult, &quot;%s - didFinishDocumentLoadForFrame\n&quot;,
</ins><span class="cx">                 descriptionSuitableForTestResult(frame).c_str());
</span><span class="cx">     if (!done) {
</span><span class="cx">         COMPtr&lt;IWebFramePrivate&gt; webFramePrivate;
</span><span class="lines">@@ -387,7 +387,7 @@
</span><span class="cx">         if (FAILED(hr))
</span><span class="cx">             return hr;
</span><span class="cx">         if (pendingFrameUnloadEvents)
</span><del>-            printf(&quot;%s - has %u onunload handler(s)\n&quot;,
</del><ins>+            fprintf(testResult, &quot;%s - has %u onunload handler(s)\n&quot;,
</ins><span class="cx">                     descriptionSuitableForTestResult(frame).c_str(), pendingFrameUnloadEvents);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -397,7 +397,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didHandleOnloadEventsForFrame(_In_opt_ IWebView* /*sender*/, _In_opt_ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;%s - didHandleOnloadEventsForFrame\n&quot;,
</del><ins>+        fprintf(testResult, &quot;%s - didHandleOnloadEventsForFrame\n&quot;,
</ins><span class="cx">                 descriptionSuitableForTestResult(frame).c_str());
</span><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -411,7 +411,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didDisplayInsecureContent(_In_opt_ IWebView* /*sender*/)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;didDisplayInsecureContent\n&quot;);
</del><ins>+        fprintf(testResult, &quot;didDisplayInsecureContent\n&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -419,7 +419,7 @@
</span><span class="cx"> HRESULT FrameLoadDelegate::didRunInsecureContent(_In_opt_ IWebView* /*sender*/, _In_opt_ IWebSecurityOrigin* /*origin*/)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpFrameLoadCallbacks())
</span><del>-        printf(&quot;didRunInsecureContent\n&quot;);
</del><ins>+        fprintf(testResult, &quot;didRunInsecureContent\n&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -442,5 +442,5 @@
</span><span class="cx"> void FrameLoadDelegate::webViewProgressFinishedNotification()
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpProgressFinishedCallback())
</span><del>-        printf(&quot;postProgressFinishedNotification\n&quot;);
</del><ins>+        fprintf(testResult, &quot;postProgressFinishedNotification\n&quot;);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinHistoryDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/HistoryDelegate.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/HistoryDelegate.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/HistoryDelegate.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool wasFailure = hasSubstituteData || (httpResponse &amp;&amp; statusCode &gt;= 400);
</span><span class="cx">         
</span><del>-    printf(&quot;WebView navigated to url \&quot;%S\&quot; with title \&quot;%s\&quot; with HTTP equivalent method \&quot;%s\&quot;.  The navigation was %s and was %s%S.\n&quot;, 
</del><ins>+    fprintf(testResult, &quot;WebView navigated to url \&quot;%S\&quot; with title \&quot;%s\&quot; with HTTP equivalent method \&quot;%s\&quot;.  The navigation was %s and was %s%S.\n&quot;, 
</ins><span class="cx">         url.c_str(), 
</span><span class="cx">         static_cast&lt;char*&gt;(titleBSTR),
</span><span class="cx">         static_cast&lt;char*&gt;(httpMethodBSTR),
</span><span class="lines">@@ -164,7 +164,7 @@
</span><span class="cx">     if (destinationURL)
</span><span class="cx">         destination = urlSuitableForTestResult(wstringFromBSTR(destinationURL));
</span><span class="cx"> 
</span><del>-    printf(&quot;WebView performed a client redirect from \&quot;%S\&quot; to \&quot;%S\&quot;.\n&quot;, source.c_str(), destination.c_str());
</del><ins>+    fprintf(testResult, &quot;WebView performed a client redirect from \&quot;%S\&quot; to \&quot;%S\&quot;.\n&quot;, source.c_str(), destination.c_str());
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx">     if (destinationURL)
</span><span class="cx">         destination = urlSuitableForTestResult(wstringFromBSTR(destinationURL));
</span><span class="cx"> 
</span><del>-    printf(&quot;WebView performed a server redirect from \&quot;%S\&quot; to \&quot;%S\&quot;.\n&quot;, source.c_str(), destination.c_str());
</del><ins>+    fprintf(testResult, &quot;WebView performed a server redirect from \&quot;%S\&quot; to \&quot;%S\&quot;.\n&quot;, source.c_str(), destination.c_str());
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx">     if (urlBSTR)
</span><span class="cx">         url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
</span><span class="cx"> 
</span><del>-    printf(&quot;WebView updated the title for history URL \&quot;%S\&quot; to \&quot;%S\&quot;.\n&quot;, url.c_str(), titleBSTR ? titleBSTR : L&quot;&quot;);
</del><ins>+    fprintf(testResult, &quot;WebView updated the title for history URL \&quot;%S\&quot; to \&quot;%S\&quot;.\n&quot;, url.c_str(), titleBSTR ? titleBSTR : L&quot;&quot;);
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="lines">@@ -212,7 +212,7 @@
</span><span class="cx">         url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
</span><span class="cx"> 
</span><span class="cx">     if (gTestRunner-&gt;dumpVisitedLinksCallback())
</span><del>-        printf(&quot;Asked to populate visited links for WebView \&quot;%S\&quot;\n&quot;, url.c_str());
</del><ins>+        fprintf(testResult, &quot;Asked to populate visited links for WebView \&quot;%S\&quot;\n&quot;, url.c_str());
</ins><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinPolicyDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/PolicyDelegate.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/PolicyDelegate.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/PolicyDelegate.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    printf(&quot;%S\n&quot;, message.c_str());
</del><ins>+    fprintf(testResult, &quot;%S\n&quot;, message.c_str());
</ins><span class="cx"> 
</span><span class="cx">     if (m_permissiveDelegate)
</span><span class="cx">         listener-&gt;use();
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx">     _bstr_t frameName;
</span><span class="cx">     frame-&gt;name(&amp;frameName.GetBSTR());
</span><span class="cx">     
</span><del>-    printf(&quot;Policy delegate: unable to implement policy with error domain '%S', error code %d, in frame '%S'\n&quot;, static_cast&lt;wchar_t*&gt;(domainStr), code, static_cast&lt;TCHAR*&gt;(frameName));
</del><ins>+    fprintf(testResult, &quot;Policy delegate: unable to implement policy with error domain '%S', error code %d, in frame '%S'\n&quot;, static_cast&lt;wchar_t*&gt;(domainStr), code, static_cast&lt;TCHAR*&gt;(frameName));
</ins><span class="cx">     
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinResourceLoadDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -236,7 +236,7 @@
</span><span class="cx">     *newRequest = nullptr;
</span><span class="cx"> 
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpResourceLoadCallbacks()) {
</span><del>-        printf(&quot;%S - willSendRequest %S redirectResponse %S\n&quot;, 
</del><ins>+        fprintf(testResult, &quot;%S - willSendRequest %S redirectResponse %S\n&quot;, 
</ins><span class="cx">             descriptionSuitableForTestResult(identifier).c_str(),
</span><span class="cx">             descriptionSuitableForTestResult(request).c_str(),
</span><span class="cx">             descriptionSuitableForTestResult(redirectResponse).c_str());
</span><span class="lines">@@ -246,13 +246,13 @@
</span><span class="cx">         return S_OK;
</span><span class="cx"> 
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;willSendRequestReturnsNullOnRedirect() &amp;&amp; redirectResponse) {
</span><del>-        printf(&quot;Returning null for this redirect\n&quot;);
</del><ins>+        fprintf(testResult, &quot;Returning null for this redirect\n&quot;);
</ins><span class="cx">         return S_OK;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _bstr_t urlBstr;
</span><span class="cx">     if (FAILED(request-&gt;URL(&amp;urlBstr.GetBSTR()))) {
</span><del>-        printf(&quot;Request has no URL\n&quot;);
</del><ins>+        fprintf(testResult, &quot;Request has no URL\n&quot;);
</ins><span class="cx">         return E_FAIL;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -274,7 +274,7 @@
</span><span class="cx">                 testHost = adoptCF(CFURLCopyHostName(testPathURL.get()));
</span><span class="cx">             }
</span><span class="cx">             if (!isLocalhost(host.get()) &amp;&amp; !hostIsUsedBySomeTestsToGenerateError(host.get()) &amp;&amp; (!testHost || isLocalhost(testHost.get()))) {
</span><del>-                printf(&quot;Blocked access to external URL %s\n&quot;, static_cast&lt;const char*&gt;(urlBstr));
</del><ins>+                fprintf(testResult, &quot;Blocked access to external URL %s\n&quot;, static_cast&lt;const char*&gt;(urlBstr));
</ins><span class="cx">                 return S_OK;
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="lines">@@ -300,7 +300,7 @@
</span><span class="cx">         return E_FAIL;
</span><span class="cx"> 
</span><span class="cx">     if (!gTestRunner-&gt;handlesAuthenticationChallenges()) {
</span><del>-        printf(&quot;%S - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet\n&quot;, descriptionSuitableForTestResult(identifier).c_str());
</del><ins>+        fprintf(testResult, &quot;%S - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet\n&quot;, descriptionSuitableForTestResult(identifier).c_str());
</ins><span class="cx">         sender-&gt;continueWithoutCredentialForAuthenticationChallenge(challenge);
</span><span class="cx">         return S_OK;
</span><span class="cx">     }
</span><span class="lines">@@ -308,7 +308,7 @@
</span><span class="cx">     const char* user = gTestRunner-&gt;authenticationUsername().c_str();
</span><span class="cx">     const char* password = gTestRunner-&gt;authenticationPassword().c_str();
</span><span class="cx"> 
</span><del>-    printf(&quot;%S - didReceiveAuthenticationChallenge - Responding with %s:%s\n&quot;, descriptionSuitableForTestResult(identifier).c_str(), user, password);
</del><ins>+    fprintf(testResult, &quot;%S - didReceiveAuthenticationChallenge - Responding with %s:%s\n&quot;, descriptionSuitableForTestResult(identifier).c_str(), user, password);
</ins><span class="cx"> 
</span><span class="cx">     COMPtr&lt;IWebURLCredential&gt; credential;
</span><span class="cx">     if (FAILED(WebKitCreateInstance(CLSID_WebURLCredential, 0, IID_IWebURLCredential, (void**)&amp;credential)))
</span><span class="lines">@@ -323,7 +323,7 @@
</span><span class="cx">     _In_opt_ IWebURLResponse* response, _In_opt_ IWebDataSource* dataSource)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpResourceLoadCallbacks()) {
</span><del>-        printf(&quot;%S - didReceiveResponse %S\n&quot;,
</del><ins>+        fprintf(testResult, &quot;%S - didReceiveResponse %S\n&quot;,
</ins><span class="cx">             descriptionSuitableForTestResult(identifier).c_str(),
</span><span class="cx">             descriptionSuitableForTestResult(response).c_str());
</span><span class="cx">     }
</span><span class="lines">@@ -338,7 +338,7 @@
</span><span class="cx">     
</span><span class="cx">         wstring url = wstringFromBSTR(urlBSTR);
</span><span class="cx"> 
</span><del>-        printf(&quot;%S has MIME type %S\n&quot;, lastPathComponent(url).c_str(), static_cast&lt;wchar_t*&gt;(mimeTypeBSTR));
</del><ins>+        fprintf(testResult, &quot;%S has MIME type %S\n&quot;, lastPathComponent(url).c_str(), static_cast&lt;wchar_t*&gt;(mimeTypeBSTR));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -348,7 +348,7 @@
</span><span class="cx"> HRESULT ResourceLoadDelegate::didFinishLoadingFromDataSource(_In_opt_ IWebView* webView, unsigned long identifier, _In_opt_ IWebDataSource* dataSource)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpResourceLoadCallbacks()) {
</span><del>-        printf(&quot;%S - didFinishLoading\n&quot;,
</del><ins>+        fprintf(testResult, &quot;%S - didFinishLoading\n&quot;,
</ins><span class="cx">             descriptionSuitableForTestResult(identifier).c_str());
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -360,7 +360,7 @@
</span><span class="cx"> HRESULT ResourceLoadDelegate::didFailLoadingWithError(_In_opt_ IWebView* webView, unsigned long identifier, _In_opt_ IWebError* error, _In_opt_ IWebDataSource* dataSource)
</span><span class="cx"> {
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpResourceLoadCallbacks()) {
</span><del>-        printf(&quot;%S - didFailLoadingWithError: %S\n&quot;, 
</del><ins>+        fprintf(testResult, &quot;%S - didFailLoadingWithError: %S\n&quot;, 
</ins><span class="cx">             descriptionSuitableForTestResult(identifier).c_str(),
</span><span class="cx">             descriptionSuitableForTestResult(error, identifier).c_str());
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinTestRunnerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx"> void TestRunner::addDisallowedURL(JSStringRef url)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement!
</span><del>-    printf(&quot;ERROR: TestRunner::addDisallowedURL(JSStringRef) not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::addDisallowedURL(JSStringRef) not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool TestRunner::callShouldCloseOnWebView()
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx"> JSValueRef TestRunner::originsWithApplicationCache(JSContextRef context)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement to get origins that have application caches.
</span><del>-    printf(&quot;ERROR: TestRunner::originsWithApplicationCache(JSContextRef) not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::originsWithApplicationCache(JSContextRef) not implemented\n&quot;);
</ins><span class="cx">     return JSValueMakeUndefined(context);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -175,13 +175,13 @@
</span><span class="cx"> void TestRunner::setStorageDatabaseIdleInterval(double)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement. Requires non-existant (on Windows) WebStorageManager
</span><del>-    printf(&quot;ERROR: TestRunner::setStorageDatabaseIdleInterval(double) not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::setStorageDatabaseIdleInterval(double) not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::closeIdleLocalStorageDatabases()
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement. Requires non-existant (on Windows) WebStorageManager
</span><del>-    printf(&quot;ERROR: TestRunner::closeIdleLocalStorageDatabases(double) not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::closeIdleLocalStorageDatabases(double) not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::clearBackForwardList()
</span><span class="lines">@@ -213,7 +213,7 @@
</span><span class="cx"> JSStringRef TestRunner::copyDecodedHostName(JSStringRef name)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement!
</span><del>-    printf(&quot;ERROR: TestRunner::copyDecodedHostName(JSStringRef) not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::copyDecodedHostName(JSStringRef) not implemented\n&quot;);
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx"> JSStringRef TestRunner::copyEncodedHostName(JSStringRef name)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement!
</span><del>-    printf(&quot;ERROR: TestRunner::copyEncodedHostName(JSStringRef) not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::copyEncodedHostName(JSStringRef) not implemented\n&quot;);
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -248,7 +248,7 @@
</span><span class="cx"> int TestRunner::numberOfPendingGeolocationPermissionRequests()
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement for Geolocation layout tests.
</span><del>-    printf(&quot;ERROR: TestRunner::numberOfPendingGeolocationPermissionRequests() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::numberOfPendingGeolocationPermissionRequests() not implemented\n&quot;);
</ins><span class="cx">     return -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -255,7 +255,7 @@
</span><span class="cx"> bool TestRunner::isGeolocationProviderActive()
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement for Geolocation layout tests.
</span><del>-    printf(&quot;ERROR: TestRunner::isGeolocationProviderActive() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::isGeolocationProviderActive() not implemented\n&quot;);
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx"> 
</span><span class="cx">     wstring localPath;
</span><span class="cx">     if (!resolveCygwinPath(input, localPath)) {
</span><del>-        printf(&quot;ERROR: Failed to resolve Cygwin path %S\n&quot;, input.c_str());
</del><ins>+        fprintf(testResult, &quot;ERROR: Failed to resolve Cygwin path %S\n&quot;, input.c_str());
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -457,7 +457,7 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement for DeviceOrientation layout tests.
</span><span class="cx">     // See https://bugs.webkit.org/show_bug.cgi?id=30335.
</span><del>-    printf(&quot;ERROR: TestRunner::setMockDeviceOrientation() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::setMockDeviceOrientation() not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
</span><span class="lines">@@ -464,7 +464,7 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement for Geolocation layout tests.
</span><span class="cx">     // See https://bugs.webkit.org/show_bug.cgi?id=28264.
</span><del>-    printf(&quot;ERROR: TestRunner::setMockGeolocationPosition() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::setMockGeolocationPosition() not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
</span><span class="lines">@@ -471,7 +471,7 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement for Geolocation layout tests.
</span><span class="cx">     // See https://bugs.webkit.org/show_bug.cgi?id=28264.
</span><del>-    printf(&quot;ERROR: TestRunner::setMockGeolocationPositionUnavailableError() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::setMockGeolocationPositionUnavailableError() not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::setGeolocationPermission(bool allow)
</span><span class="lines">@@ -533,7 +533,7 @@
</span><span class="cx"> void TestRunner::setSpatialNavigationEnabled(bool enabled)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement for SpatialNavigation layout tests.
</span><del>-    printf(&quot;ERROR: TestRunner::setSpatialNavigationEnabled(bool) not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::setSpatialNavigationEnabled(bool) not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::setAllowUniversalAccessFromFileURLs(bool enabled)
</span><span class="lines">@@ -633,7 +633,7 @@
</span><span class="cx"> void TestRunner::setAutomaticLinkDetectionEnabled(bool)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement this.
</span><del>-    printf(&quot;ERROR: TestRunner::setAutomaticLinkDetectionEnabled(bool) not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::setAutomaticLinkDetectionEnabled(bool) not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::setTabKeyCyclesThroughElements(bool shouldCycle)
</span><span class="lines">@@ -1036,7 +1036,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool TestRunner::isCommandEnabled(JSStringRef /*name*/)
</span><span class="cx"> {
</span><del>-    printf(&quot;ERROR: TestRunner::isCommandEnabled() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::isCommandEnabled() not implemented\n&quot;);
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1277,7 +1277,7 @@
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::authenticateSession(JSStringRef, JSStringRef, JSStringRef)
</span><span class="cx"> {
</span><del>-    printf(&quot;ERROR: TestRunner::authenticateSession() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::authenticateSession() not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::abortModal()
</span><span class="lines">@@ -1309,17 +1309,17 @@
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::addChromeInputField()
</span><span class="cx"> {
</span><del>-    printf(&quot;ERROR: TestRunner::addChromeInputField() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::addChromeInputField() not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::removeChromeInputField()
</span><span class="cx"> {
</span><del>-    printf(&quot;ERROR: TestRunner::removeChromeInputField() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::removeChromeInputField() not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::focusWebView()
</span><span class="cx"> {
</span><del>-    printf(&quot;ERROR: TestRunner::focusWebView() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::focusWebView() not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::setBackingScaleFactor(double)
</span><span class="lines">@@ -1363,22 +1363,22 @@
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::grantWebNotificationPermission(JSStringRef origin)
</span><span class="cx"> {
</span><del>-    printf(&quot;ERROR: TestRunner::grantWebNotificationPermission(JSStringRef) not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::grantWebNotificationPermission(JSStringRef) not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::denyWebNotificationPermission(JSStringRef jsOrigin)
</span><span class="cx"> {
</span><del>-    printf(&quot;ERROR: TestRunner::denyWebNotificationPermission(JSStringRef) not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::denyWebNotificationPermission(JSStringRef) not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::removeAllWebNotificationPermissions()
</span><span class="cx"> {
</span><del>-    printf(&quot;ERROR: TestRunner::removeAllWebNotificationPermissions() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::removeAllWebNotificationPermissions() not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::simulateWebNotificationClick(JSValueRef jsNotification)
</span><span class="cx"> {
</span><del>-    printf(&quot;ERROR: TestRunner::simulateWebNotificationClick() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::simulateWebNotificationClick() not implemented\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::simulateLegacyWebNotificationClick(JSStringRef title)
</span><span class="lines">@@ -1388,7 +1388,7 @@
</span><span class="cx"> 
</span><span class="cx"> unsigned TestRunner::imageCountInGeneralPasteboard() const
</span><span class="cx"> {
</span><del>-    printf(&quot;ERROR: TestRunner::imageCountInGeneralPasteboard() not implemented\n&quot;);
</del><ins>+    fprintf(testResult, &quot;ERROR: TestRunner::imageCountInGeneralPasteboard() not implemented\n&quot;);
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinUIDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/UIDelegate.cpp (210502 => 210503)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/UIDelegate.cpp        2017-01-09 12:43:49 UTC (rev 210502)
+++ trunk/Tools/DumpRenderTree/win/UIDelegate.cpp        2017-01-09 12:46:34 UTC (rev 210503)
</span><span class="lines">@@ -453,8 +453,8 @@
</span><span class="cx"> HRESULT UIDelegate::runJavaScriptAlertPanelWithMessage(_In_opt_ IWebView* /*sender*/, _In_ BSTR message)
</span><span class="cx"> {
</span><span class="cx">     if (!done) {
</span><del>-        printf(&quot;ALERT: %S\n&quot;, message ? message : L&quot;&quot;);
-        fflush(stdout);
</del><ins>+        fprintf(testResult, &quot;ALERT: %S\n&quot;, message ? message : L&quot;&quot;);
+        fflush(testResult);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -463,7 +463,7 @@
</span><span class="cx"> HRESULT UIDelegate::runJavaScriptConfirmPanelWithMessage(_In_opt_ IWebView* /*sender*/, _In_ BSTR message, _Out_ BOOL* result)
</span><span class="cx"> {
</span><span class="cx">     if (!done)
</span><del>-        printf(&quot;CONFIRM: %S\n&quot;, message ? message : L&quot;&quot;);
</del><ins>+        fprintf(testResult, &quot;CONFIRM: %S\n&quot;, message ? message : L&quot;&quot;);
</ins><span class="cx"> 
</span><span class="cx">     *result = TRUE;
</span><span class="cx"> 
</span><span class="lines">@@ -473,7 +473,7 @@
</span><span class="cx"> HRESULT UIDelegate::runJavaScriptTextInputPanelWithPrompt(_In_opt_ IWebView* /*sender*/, _In_ BSTR message, _In_ BSTR defaultText, __deref_opt_out BSTR* result)
</span><span class="cx"> {
</span><span class="cx">     if (!done)
</span><del>-        printf(&quot;PROMPT: %S, default text: %S\n&quot;, message ? message : L&quot;&quot;, defaultText ? defaultText : L&quot;&quot;);
</del><ins>+        fprintf(testResult, &quot;PROMPT: %S, default text: %S\n&quot;, message ? message : L&quot;&quot;, defaultText ? defaultText : L&quot;&quot;);
</ins><span class="cx"> 
</span><span class="cx">     *result = SysAllocString(defaultText);
</span><span class="cx"> 
</span><span class="lines">@@ -486,7 +486,7 @@
</span><span class="cx">         return E_POINTER;
</span><span class="cx"> 
</span><span class="cx">     if (!done)
</span><del>-        printf(&quot;CONFIRM NAVIGATION: %S\n&quot;, message ? message : L&quot;&quot;);
</del><ins>+        fprintf(testResult, &quot;CONFIRM NAVIGATION: %S\n&quot;, message ? message : L&quot;&quot;);
</ins><span class="cx"> 
</span><span class="cx">     *result = !gTestRunner-&gt;shouldStayOnPageAfterHandlingBeforeUnload();
</span><span class="cx"> 
</span><span class="lines">@@ -507,7 +507,7 @@
</span><span class="cx">             newMessage = newMessage.substr(0, fileProtocol) + lastPathComponent(newMessage.substr(fileProtocol + fileURL.size()));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto out = gTestRunner-&gt;dumpJSConsoleLogInStdErr() ? stderr : stdout;
</del><ins>+    auto out = gTestRunner-&gt;dumpJSConsoleLogInStdErr() ? stderr : testResult;
</ins><span class="cx">     fprintf(out, &quot;CONSOLE MESSAGE: &quot;);
</span><span class="cx">     if (lineNumber)
</span><span class="cx">         fprintf(out, &quot;line %d: &quot;, lineNumber);
</span><span class="lines">@@ -594,7 +594,7 @@
</span><span class="cx">     origin-&gt;port(&amp;port);
</span><span class="cx"> 
</span><span class="cx">     if (!done &amp;&amp; gTestRunner-&gt;dumpDatabaseCallbacks())
</span><del>-        printf(&quot;UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:{%s, %s, %i} database:%S\n&quot;, static_cast&lt;const char*&gt;(protocol), static_cast&lt;const char*&gt;(host), port, databaseIdentifier);
</del><ins>+        fprintf(testResult, &quot;UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:{%s, %s, %i} database:%S\n&quot;, static_cast&lt;const char*&gt;(protocol), static_cast&lt;const char*&gt;(host), port, databaseIdentifier);
</ins><span class="cx"> 
</span><span class="cx">     unsigned long long defaultQuota = 5 * 1024 * 1024;
</span><span class="cx">     double testDefaultQuota = gTestRunner-&gt;databaseDefaultQuota();
</span><span class="lines">@@ -626,7 +626,7 @@
</span><span class="cx">     if (maxQuota &gt;= 0) {
</span><span class="cx">         if (defaultQuota &lt; expectedSize &amp;&amp; expectedSize &lt;= maxQuota) {
</span><span class="cx">             newQuota = expectedSize;
</span><del>-            printf(&quot;UI DELEGATE DATABASE CALLBACK: increased quota to %llu\n&quot;, newQuota);
</del><ins>+            fprintf(testResult, &quot;UI DELEGATE DATABASE CALLBACK: increased quota to %llu\n&quot;, newQuota);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     origin-&gt;setQuota(newQuota);
</span><span class="lines">@@ -660,7 +660,7 @@
</span><span class="cx"> HRESULT UIDelegate::setStatusText(_In_opt_ IWebView*, _In_ BSTR text)
</span><span class="cx"> { 
</span><span class="cx">     if (gTestRunner-&gt;dumpStatusCallbacks())
</span><del>-        printf(&quot;UI DELEGATE STATUS CALLBACK: setStatusText:%S\n&quot;, text ? text : L&quot;&quot;);
</del><ins>+        fprintf(testResult, &quot;UI DELEGATE STATUS CALLBACK: setStatusText:%S\n&quot;, text ? text : L&quot;&quot;);
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -693,6 +693,6 @@
</span><span class="cx"> 
</span><span class="cx"> HRESULT UIDelegate::didPressMissingPluginButton(_In_opt_ IDOMElement* /*element*/)
</span><span class="cx"> {
</span><del>-    printf(&quot;MISSING PLUGIN BUTTON PRESSED\n&quot;);
</del><ins>+    fprintf(testResult, &quot;MISSING PLUGIN BUTTON PRESSED\n&quot;);
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>