[Chromium] Remove header dependency of ImageDiff to WTF
authorwangxianzhu@chromium.org <wangxianzhu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2012 01:35:51 +0000 (01:35 +0000)
committerwangxianzhu@chromium.org <wangxianzhu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2012 01:35:51 +0000 (01:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=88422

Reviewed by Ryosuke Niwa.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
* DumpRenderTree/chromium/ImageDiff.cpp:
(untestedCompareImages):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119781 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
Tools/DumpRenderTree/chromium/ImageDiff.cpp

index f03fc5f..a2d5303 100644 (file)
@@ -1,3 +1,14 @@
+2012-06-07  Xianzhu Wang  <wangxianzhu@chromium.org>
+
+        [Chromium] Remove header dependency of ImageDiff to WTF
+        https://bugs.webkit.org/show_bug.cgi?id=88422
+
+        Reviewed by Ryosuke Niwa.
+
+        * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+        * DumpRenderTree/chromium/ImageDiff.cpp:
+        (untestedCompareImages):
+
 2012-06-07  Dongwoo Im  <dw.im@samsung.com>
 
         [EFL] [DRT] DRT enables WebAudio when WebAudio feature is enabled.
index fef0d2c..c102e5f 100644 (file)
@@ -58,7 +58,6 @@
                 '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support_gfx',
             ],
             'include_dirs': [
-                '<(source_dir)/WTF',
                 '<(DEPTH)',
             ],
             'sources': [
index 966554b..906813d 100644 (file)
@@ -34,8 +34,6 @@
 // The exact format of this tool's output to stdout is important, to match
 // what the run-webkit-tests script expects.
 
-#include "config.h"
-
 #include "webkit/support/webkit_support_gfx.h"
 #include <algorithm>
 #include <iterator>
 #include <string.h>
 #include <vector>
 
-#if OS(WINDOWS)
+#if defined(_WIN32)
 #include <windows.h>
 #define PATH_MAX MAX_PATH
+#define strtok_r strtok_s
 #endif
 
-// Define macro here to make ImageDiff independent of JavaScriptCore.
+// Define macro here to make ImageDiff independent of WTF.
 #ifdef NDEBUG
 #define ASSERT(assertion) do { } while (0)
 #else
@@ -342,13 +341,8 @@ int untestedCompareImages(ImageComparisonProc comparator)
     while (fgets(buffer, sizeof(buffer), stdin)) {
         if (!strncmp("Content-length: ", buffer, 16)) {
             char* context;
-#if OS(WINDOWS)
-            strtok_s(buffer, " ", &context);
-            int imageSize = strtol(strtok_s(0, " ", &context), 0, 10);
-#else
             strtok_r(buffer, " ", &context);
             int imageSize = strtol(strtok_r(0, " ", &context), 0, 10);
-#endif
 
             bool success = false;
             if (imageSize > 0 && !actualImage.hasImage()) {