Title: [210628] trunk/Tools
Revision
210628
Author
[email protected]
Date
2017-01-12 01:22:45 -0800 (Thu, 12 Jan 2017)

Log Message

Followup fix after r210503.
https://bugs.webkit.org/show_bug.cgi?id=166887

Reviewed by Alex Christensen.

After <http://trac.webkit.org/changeset/210503>, test results are written to a
duplicated file handle on Windows. This patch fixes the remaining call sites.

* DumpRenderTree/PixelDumpSupport.cpp:
* DumpRenderTree/TestRunner.cpp:
(TestRunner::waitToDumpWatchdogTimerFired):
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/win/AccessibilityControllerWin.cpp:
* DumpRenderTree/win/DumpRenderTree.cpp:
* DumpRenderTree/win/DumpRenderTreeWin.h:
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::setSpellCheckerLoggingEnabled):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (210627 => 210628)


--- trunk/Tools/ChangeLog	2017-01-12 09:01:40 UTC (rev 210627)
+++ trunk/Tools/ChangeLog	2017-01-12 09:22:45 UTC (rev 210628)
@@ -1,3 +1,23 @@
+2017-01-12  Per Arne Vollan  <[email protected]>
+
+        Followup fix after r210503.
+        https://bugs.webkit.org/show_bug.cgi?id=166887
+
+        Reviewed by Alex Christensen.
+
+        After <http://trac.webkit.org/changeset/210503>, test results are written to a
+        duplicated file handle on Windows. This patch fixes the remaining call sites.
+
+        * DumpRenderTree/PixelDumpSupport.cpp:
+        * DumpRenderTree/TestRunner.cpp:
+        (TestRunner::waitToDumpWatchdogTimerFired):
+        * DumpRenderTree/TestRunner.h:
+        * DumpRenderTree/win/AccessibilityControllerWin.cpp:
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        * DumpRenderTree/win/DumpRenderTreeWin.h:
+        * DumpRenderTree/win/TestRunnerWin.cpp:
+        (TestRunner::setSpellCheckerLoggingEnabled):
+
 2017-01-11  Megan Gardner  <[email protected]>
 
         Add committer status for Megan

Modified: trunk/Tools/DumpRenderTree/PixelDumpSupport.cpp (210627 => 210628)


--- trunk/Tools/DumpRenderTree/PixelDumpSupport.cpp	2017-01-12 09:01:40 UTC (rev 210627)
+++ trunk/Tools/DumpRenderTree/PixelDumpSupport.cpp	2017-01-12 09:22:45 UTC (rev 210628)
@@ -43,10 +43,6 @@
 #include "PixelDumpSupportCairo.h"
 #endif
 
-#if !PLATFORM(WIN)
-#define testResult stdout
-#endif
-
 void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash)
 {
     RefPtr<BitmapContext> context;

Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (210627 => 210628)


--- trunk/Tools/DumpRenderTree/TestRunner.cpp	2017-01-12 09:01:40 UTC (rev 210627)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp	2017-01-12 09:22:45 UTC (rev 210628)
@@ -60,6 +60,8 @@
 #include <Carbon/Carbon.h>
 #endif
 
+FILE* testResult = stdout;
+
 const unsigned TestRunner::viewWidth = 800;
 const unsigned TestRunner::viewHeight = 600;
 
@@ -2284,12 +2286,12 @@
 void TestRunner::waitToDumpWatchdogTimerFired()
 {
     const char* message = "FAIL: Timed out waiting for notifyDone to be called\n";
-    fprintf(stdout, "%s", message);
+    fprintf(testResult, "%s", message);
 
     auto accumulatedLogs = getAndResetAccumulatedLogs();
     if (!accumulatedLogs.isEmpty()) {
         const char* message = "Logs accumulated during test run:\n";
-        fprintf(stdout, "%s%s\n", message, accumulatedLogs.utf8().data());
+        fprintf(testResult, "%s%s\n", message, accumulatedLogs.utf8().data());
     }
 
     notifyDone();

Modified: trunk/Tools/DumpRenderTree/TestRunner.h (210627 => 210628)


--- trunk/Tools/DumpRenderTree/TestRunner.h	2017-01-12 09:01:40 UTC (rev 210627)
+++ trunk/Tools/DumpRenderTree/TestRunner.h	2017-01-12 09:22:45 UTC (rev 210628)
@@ -36,6 +36,8 @@
 #include <vector>
 #include <wtf/RefCounted.h>
 
+extern FILE* testResult;
+
 class TestRunner : public WTR::UIScriptContextDelegate, public RefCounted<TestRunner> {
     WTF_MAKE_NONCOPYABLE(TestRunner);
 public:

Modified: trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp (210627 => 210628)


--- trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp	2017-01-12 09:01:40 UTC (rev 210627)
+++ trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp	2017-01-12 09:22:45 UTC (rev 210628)
@@ -29,6 +29,7 @@
 #include "AccessibilityUIElement.h"
 #include "DumpRenderTree.h"
 #include "FrameLoadDelegate.h"
+#include "TestRunner.h"
 #include <_javascript_Core/JSRetainPtr.h>
 #include <_javascript_Core/JSStringRef.h>
 #include <_javascript_Core/JSStringRefBSTR.h>

Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (210627 => 210628)


--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2017-01-12 09:01:40 UTC (rev 210627)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2017-01-12 09:22:45 UTC (rev 210628)
@@ -123,8 +123,6 @@
 
 UINT_PTR waitToDumpWatchdog = 0;
 
-FILE* testResult = nullptr;
-
 void setPersistentUserStyleSheetLocation(CFStringRef url)
 {
     persistentUserStyleSheetLocation = url;

Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTreeWin.h (210627 => 210628)


--- trunk/Tools/DumpRenderTree/win/DumpRenderTreeWin.h	2017-01-12 09:01:40 UTC (rev 210627)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTreeWin.h	2017-01-12 09:22:45 UTC (rev 210628)
@@ -43,8 +43,6 @@
 
 extern HWND webViewWindow;
 
-extern FILE* testResult;
-
 #include <WebCore/COMPtr.h>
 #include <string>
 #include <wtf/HashMap.h>

Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (210627 => 210628)


--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp	2017-01-12 09:01:40 UTC (rev 210627)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp	2017-01-12 09:22:45 UTC (rev 210628)
@@ -1394,5 +1394,5 @@
 
 void TestRunner::setSpellCheckerLoggingEnabled(bool enabled)
 {
-    printf("ERROR: TestRunner::setSpellCheckerLoggingEnabled() not implemented\n");
+    fprintf(testResult, "ERROR: TestRunner::setSpellCheckerLoggingEnabled() not implemented\n");
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to