Bug 94567 - _compare_image() swaps actual and expected images by mistake
Summary: _compare_image() swaps actual and expected images by mistake
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-20 20:25 PDT by Simon Fraser (smfr)
Modified: 2012-08-21 14:35 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.88 KB, patch)
2012-08-20 20:30 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (10.47 KB, patch)
2012-08-21 13:20 PDT, Dirk Pranke
ojan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2012-08-20 20:25:57 PDT
I'm pretty sure that _compare_image() is swapping the images by mistake:

            diff_result = self._port.diff_image(driver_output.image, expected_driver_output.image)

    def diff_image(self, expected_contents, actual_contents, tolerance):

Note flipped order of params.
Comment 1 Simon Fraser (smfr) 2012-08-20 20:30:30 PDT
Created attachment 159604 [details]
Patch
Comment 2 Simon Fraser (smfr) 2012-08-20 21:49:38 PDT
Comment on attachment 159604 [details]
Patch

Dirk wants to fix this another way.
Comment 4 Dirk Pranke 2012-08-21 13:20:27 PDT
Created attachment 159751 [details]
Patch
Comment 5 Dirk Pranke 2012-08-21 14:35:49 PDT
Committed r126188: <http://trac.webkit.org/changeset/126188>