Changeset 258739 in webkit


Ignore:
Timestamp:
Mar 19, 2020 4:05:24 PM (4 years ago)
Author:
eric.carlson@apple.com
Message:

Allow for some tolerance when checking canvas pixels in fast/mediastream tests
https://bugs.webkit.org/show_bug.cgi?id=209259
<rdar://problem/60609789>

Unreviewed tweak of r258700, increase the maximum tolerance to +/- 2.

  • resources/platform-helper.js:

(videoCanvasPixelComparisonTolerance):
(checkPixelColorWithTolerance):

Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r258736 r258739  
     12020-03-19  Eric Carlson  <eric.carlson@apple.com>
     2
     3        Allow for some tolerance when checking canvas pixels in fast/mediastream tests
     4        https://bugs.webkit.org/show_bug.cgi?id=209259
     5        <rdar://problem/60609789>
     6
     7        Unreviewed tweak of r258700, increase the maximum tolerance to +/- 2.
     8
     9        * resources/platform-helper.js:
     10        (videoCanvasPixelComparisonTolerance):
     11        (checkPixelColorWithTolerance):
     12
    1132020-03-19  Brent Fulgham  <bfulgham@apple.com>
    214
  • trunk/LayoutTests/resources/platform-helper.js

    r258700 r258739  
    2020{
    2121    const tolerance = videoCanvasPixelComparisonTolerance();
    22     return Math.abs(pixel[0] - r) < tolerance
    23         && Math.abs(pixel[1] - g) < tolerance
    24         && Math.abs(pixel[2] - b) < tolerance
    25         && Math.abs(pixel[3] - a) < tolerance;
     22    return Math.abs(pixel[0] - r) <= tolerance
     23        && Math.abs(pixel[1] - g) <= tolerance
     24        && Math.abs(pixel[2] - b) <= tolerance
     25        && Math.abs(pixel[3] - a) <= tolerance;
    2626}
    2727
Note: See TracChangeset for help on using the changeset viewer.