⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 118882 in webkit


Ignore:
Timestamp:
May 29, 2012, 7:18:08 PM (14 years ago)
Author:
ojan@chromium.org
Message:

Show an error in the pretty diff when an image lacks a checksum
https://bugs.webkit.org/show_bug.cgi?id=87791

Reviewed by Dirk Pranke.

  • PrettyPatch/PrettyPatch.rb:
  • PrettyPatch/PrettyPatch_test.rb:
Location:
trunk/Websites/bugs.webkit.org
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Websites/bugs.webkit.org/ChangeLog

    r112827 r118882  
     12012-05-29  Ojan Vafai  <ojan@chromium.org>
     2
     3        Show an error in the pretty diff when an image lacks a checksum
     4        https://bugs.webkit.org/show_bug.cgi?id=87791
     5
     6        Reviewed by Dirk Pranke.
     7
     8        * PrettyPatch/PrettyPatch.rb:
     9        * PrettyPatch/PrettyPatch_test.rb:
     10
    1112012-04-01  Adam Barth  <abarth@webkit.org>
    212
  • trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb

    r103985 r118882  
    9898        Websites
    9999    ]
     100
     101    IMAGE_CHECKSUM_ERROR = "<p>INVALID: Image lacks a checksum. This will fail with a MISSING error in run-webkit-tests. Always generate new png files using run-webkit-tests.</p>"
    100102
    101103    def self.normalize_line_ending(s)
     
    579581            image_snippet = "<img class='image' src='" + @image_url + "' />"
    580582            if not @image_checksum then
    581                 return image_snippet
     583                return IMAGE_CHECKSUM_ERROR + image_snippet
    582584            end
    583585            return "<p>" + @image_checksum + "</p>" + image_snippet
     
    602604                        if image_checksum
    603605                            str += image_checksum + "<br>"
     606                        else
     607                            str += IMAGE_CHECKSUM_ERROR + "<br>"
    604608                        end
    605609                        if image_url
  • trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch_test.rb

    r95159 r118882  
    6161        assert_equal(0, $last_prettify_part_count["binary"], "Wrong number of 'binary' parts in " + description)
    6262        assert_equal(0, $last_prettify_part_count["extract-error"], "Wrong number of 'extract-error' parts in " + description)
     63        return pretty
    6364    end
    6465
     
    6667        PATCHES.each { |id, info| check_one_patch(id, info) }
    6768    end
     69
     70    def test_images_without_checksum
     71        pretty = check_one_patch(144064, ["Images without checksums", 10, 5, 4, 8])
     72        puts pretty
     73        matches = pretty.match("INVALID: Image lacks a checksum.")
     74        assert(matches, "Should have invalid checksums")
     75        # FIXME: This should only have 4 invalid images, but git apply needs an actual copy of the before binary
     76        # in order to apply diffs correctly. The end result is that all images in the patch are empty and thus
     77        # thought to have no checksum, instead of the 4 images that actually don't have a checksum.
     78        assert_equal(10, pretty.scan(/INVALID\: Image lacks a checksum\./).size)
     79    end
    6880end
Note: See TracChangeset for help on using the changeset viewer.