Title: [210965] trunk/Tools
Revision
210965
Author
[email protected]
Date
2017-01-20 09:50:22 -0800 (Fri, 20 Jan 2017)

Log Message

[Win] Test output results should not be written twice.
https://bugs.webkit.org/show_bug.cgi?id=167197

Reviewed by Brent Fulgham.

Prevent test output from being written twice by returning early from
the dump() function, if it already has been called.
This patch also adds a missing newline to a test output line.

* DumpRenderTree/win/DumpRenderTree.cpp:
(dump):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (210964 => 210965)


--- trunk/Tools/ChangeLog	2017-01-20 16:56:17 UTC (rev 210964)
+++ trunk/Tools/ChangeLog	2017-01-20 17:50:22 UTC (rev 210965)
@@ -1,3 +1,17 @@
+2017-01-20  Per Arne Vollan  <[email protected]>
+
+        [Win] Test output results should not be written twice.
+        https://bugs.webkit.org/show_bug.cgi?id=167197
+
+        Reviewed by Brent Fulgham.
+
+        Prevent test output from being written twice by returning early from
+        the dump() function, if it already has been called.
+        This patch also adds a missing newline to a test output line. 
+        
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (dump):
+
 2017-01-20  Antoine Quint  <[email protected]>
 
         [Modern Media Controls] Turn modern media controls on by default

Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (210964 => 210965)


--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2017-01-20 16:56:17 UTC (rev 210964)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2017-01-20 17:50:22 UTC (rev 210965)
@@ -678,6 +678,11 @@
 
 void dump()
 {
+    if (done) {
+        fprintf(stderr, "dump() has already been called!\n");
+        return;
+    }
+
     ::InvalidateRect(webViewWindow, 0, TRUE);
     ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
 
@@ -722,7 +727,7 @@
             if (::gTestRunner->dumpBackForwardList())
                 dumpBackForwardListForAllWindows();
         } else
-            fprintf(testResult, "ERROR: nil result from %s", ::gTestRunner->dumpAsText() ? "IDOMElement::innerText" : "IFrameViewPrivate::renderTreeAsExternalRepresentation");
+            fprintf(testResult, "ERROR: nil result from %s\n", ::gTestRunner->dumpAsText() ? "IDOMElement::innerText" : "IFrameViewPrivate::renderTreeAsExternalRepresentation");
 
         if (printSeparators)
             fputs("#EOF\n", testResult); // terminate the content block
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to