2011-01-20 Dirk Pranke <dpranke@chromium.org>
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2011 01:06:47 +0000 (01:06 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2011 01:06:47 +0000 (01:06 +0000)
        Reviewed by Tony Chang.

        Fix bug introduced in r72688 / bug 52768 that broke the
        generation of the output filename links in the results.html
        output. Apparently none of the unit tests actually checked to
        make sure the generated links were correct :(

        https://bugs.webkit.org/show_bug.cgi?id=52854

        * Scripts/webkitpy/layout_tests/layout_package/test_failures.py:
        * Scripts/webkitpy/layout_tests/layout_package/test_failures_unittest.py:

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

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py
Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures_unittest.py

index 685630ce36d1a5833e63140632a15d089d25297e..9b9a6b621f5a9fa55e1526bf61c1c7ae003d6eef 100644 (file)
@@ -1,3 +1,17 @@
+2011-01-20  Dirk Pranke  <dpranke@chromium.org>
+
+        Reviewed by Tony Chang.
+
+        Fix bug introduced in r72688 / bug 52768 that broke the
+        generation of the output filename links in the results.html
+        output. Apparently none of the unit tests actually checked to
+        make sure the generated links were correct :(
+
+        https://bugs.webkit.org/show_bug.cgi?id=52854
+
+        * Scripts/webkitpy/layout_tests/layout_package/test_failures.py:
+        * Scripts/webkitpy/layout_tests/layout_package/test_failures_unittest.py:
+
 2011-01-20  Alexey Proskuryakov  <ap@apple.com>
 
         Reviewed by Darin Adler.
index 5ad2e04ce1d549caece93eb9fbb2f6751eb288cc..eb59d36a088653720247e3e9259efcd2bdb4baae 100644 (file)
@@ -123,7 +123,7 @@ class TestFailure(object):
         # FIXME: technically this breaks if files don't use ".ext" to indicate
         # the extension, but passing in a Filesystem object here is a huge
         # hassle.
-        return filename[filename.rfind('.')] + modifier
+        return filename[:filename.rfind('.')] + modifier
 
 
 class FailureWithType(TestFailure):
index b2698d175dd204d145bd1cc329fbfbdc5cc8237c..c5aa2d6cecf62c1a3509e18b6745153abf80fa9f 100644 (file)
@@ -89,6 +89,12 @@ class Test(unittest.TestCase):
         crash_set = set([FailureCrash(), "FailureCrash"])
         self.assertEqual(len(crash_set), 2)
 
+    def test_relative_output_filename(self):
+        # This could be any Failure* object, since we're testing a method
+        # on the base class.
+        failure_obj = FailureTextMismatch()
+        actual_filename = failure_obj.relative_output_filename("fast/html/article-element.html", "-actual.txt")
+        self.assertEquals(actual_filename, "fast/html/article-element-actual.txt")
 
 if __name__ == '__main__':
     unittest.main()