[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

dpranke at chromium.org dpranke at chromium.org
Thu Apr 8 02:05:09 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit f7eec3e48d3390d78cb89430b008b2d2e93ff61c
Author: dpranke at chromium.org <dpranke at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Mar 1 19:36:23 2010 +0000

    2010-03-01  Dirk Pranke <dpranke at chromium.org>
    
             Reviewed by David Levin.
    
             new-chromium-webkit-tests --platform=mac-leopard diffs are backwards
             https://bugs.webkit.org/show_bug.cgi?id=35265
    
             Some parts of the code passed arguments as
             "actual, expected" and some passed as "expected, actual".
             As you might imagine, this lead to great confusion and wrongness.
             Standardize on "expected, actual" as that's the order which is
             passed to the underlying diff tool.
    
             Based on a patch by Eric Siedel <eric at webkit.org>.
    
             * Scripts/webkitpy/layout_tests/port/base.py:
             * Scripts/webkitpy/layout_tests/port/chromium.py:
             * Scripts/webkitpy/layout_tests/port/test.py:
             * Scripts/webkitpy/layout_tests/test_types/image_diff.py
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55372 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 0863f02..eec94f4 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,23 @@
+2010-03-01  Dirk Pranke <dpranke at chromium.org>
+
+         Reviewed by David Levin.
+
+         new-chromium-webkit-tests --platform=mac-leopard diffs are backwards
+         https://bugs.webkit.org/show_bug.cgi?id=35265
+
+         Some parts of the code passed arguments as
+         "actual, expected" and some passed as "expected, actual".
+         As you might imagine, this lead to great confusion and wrongness.
+         Standardize on "expected, actual" as that's the order which is
+         passed to the underlying diff tool.
+
+         Based on a patch by Eric Siedel <eric at webkit.org>.
+
+         * Scripts/webkitpy/layout_tests/port/base.py:
+         * Scripts/webkitpy/layout_tests/port/chromium.py:
+         * Scripts/webkitpy/layout_tests/port/test.py:
+         * Scripts/webkitpy/layout_tests/test_types/image_diff.py
+
 2010-03-01  Chris Jerdonek  <cjerdonek at webkit.org>
 
         Unreviewed.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
index cb1e0e9..d08863d 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
@@ -75,15 +75,15 @@ class Port(object):
         Returns whether the system is properly configured."""
         raise NotImplementedError('Port.check_sys_deps')
 
-    def compare_text(self, actual_text, expected_text):
+    def compare_text(self, expected_text, actual_text):
         """Return whether or not the two strings are *not* equal. This
         routine is used to diff text output.
 
         While this is a generic routine, we include it in the Port
         interface so that it can be overriden for testing purposes."""
-        return actual_text != expected_text
+        return expected_text != actual_text
 
-    def diff_image(self, actual_filename, expected_filename,
+    def diff_image(self, expected_filename, actual_filename,
                    diff_filename=None):
         """Compare two image files and produce a delta image file.
 
@@ -94,7 +94,7 @@ class Port(object):
         While this is a generic routine, we include it in the Port
         interface so that it can be overriden for testing purposes."""
         executable = self._path_to_image_diff()
-        cmd = [executable, '--diff', actual_filename, expected_filename]
+        cmd = [executable, '--diff', expected_filename, actual_filename]
         if diff_filename:
             cmd.append(diff_filename)
         result = 1
@@ -111,8 +111,8 @@ class Port(object):
             pass
         return result
 
-    def diff_text(self, actual_text, expected_text,
-                  actual_filename, expected_filename):
+    def diff_text(self, expected_text, actual_text,
+                  expected_filename, actual_filename):
         """Returns a string containing the diff of the two text strings
         in 'unified diff' format.
 
@@ -476,8 +476,8 @@ class Port(object):
                '--end-delete=##WDIFF_END##',
                '--start-insert=##WDIFF_ADD##',
                '--end-insert=##WDIFF_END##',
-               expected_filename,
-               actual_filename]
+               actual_filename,
+               expected_filename]
         global _wdiff_available
         result = ''
         try:
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
index c81d0a7..25adcd7 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
@@ -90,9 +90,6 @@ class ChromiumPort(base.Port):
 
         return result
 
-    def compare_text(self, actual_text, expected_text):
-        return actual_text != expected_text
-
     def path_from_chromium_base(self, *comps):
         """Returns the full path to path made by joining the top of the
         Chromium source tree and the list of path components in |*comps|."""
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
index 8fa32b2..f959e6e 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
@@ -55,15 +55,15 @@ class TestPort(base.Port):
     def check_sys_deps(self, needs_http):
         return True
 
-    def diff_image(self, actual_filename, expected_filename,
+    def diff_image(self, expected_filename, actual_filename,
                    diff_filename=None):
         return False
 
-    def compare_text(self, actual_text, expected_text):
+    def compare_text(self, expected_text, actual_text):
         return False
 
-    def diff_text(self, actual_text, expected_text,
-                  actual_filename, expected_filename):
+    def diff_text(self, expected_text, actual_text,
+                  expected_filename, actual_filename):
         return ''
 
     def name(self):
@@ -120,7 +120,7 @@ class TestPort(base.Port):
     def version():
         return ''
 
-    def wdiff_text(self, actual_filename, expected_filename):
+    def wdiff_text(self, expected_filename, actual_filename):
         return ''
 
 
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
index 1df7ca3..94c3467 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
@@ -98,7 +98,7 @@ class ImageDiff(test_type_base.TestTypeBase):
 
         try:
             _compare_available = True
-            result = port.diff_image(actual_filename, expected_filename,
+            result = port.diff_image(expected_filename, actual_filename,
                                      diff_filename)
         except ValueError:
             _compare_available = False

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list