Commit b63ff491 authored by Andrew Osmond's avatar Andrew Osmond
Browse files

Bug 1551088 - Part 8. Add reftest annotations for slight premultiplication differences. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D46451

--HG--
extra : moz-landing-system : lando
parent 23f460f9
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -53,7 +53,18 @@ async function compareImages(window, expected, test) {
    "The test and expected images must be the same size"
  );

  return window.windowUtils.compareCanvases(expectedCanvas, testCanvas, {});
  var maxDifference = {};
  var differences = window.windowUtils.compareCanvases(
    expectedCanvas,
    testCanvas,
    maxDifference
  );

  // Fuzz for minor differences that can be caused by the encoder.
  if (maxDifference.value > 1) {
    return differences;
  }
  return 0;
}

async function cropAndCompare(window, src, expected, test, region, subregions) {
+1 −1
Original line number Diff line number Diff line
# ICO BMP and PNG mixed tests

== wrapper.html?pointer.cur wrapper.html?pointer.png
fuzzy(1-1,67-67) == wrapper.html?pointer.cur wrapper.html?pointer.png
+1 −1
Original line number Diff line number Diff line
@@ -19,4 +19,4 @@
== ico-size-256x256-32bpp.ico ico-size-256x256-32bpp.png
== ico-partial-transparent-32bpp.ico ico-partial-transparent-32bpp.png
== ico-transparent-32bpp.ico ico-transparent-32bpp.png
== ico-not-square-transparent-32bpp.ico ico-not-square-transparent-32bpp.png
fuzzy(1-1,81-81) == ico-not-square-transparent-32bpp.ico ico-not-square-transparent-32bpp.png
+1 −1
Original line number Diff line number Diff line
# ICO BMP and PNG mixed tests

== mixed-bmp-png.ico mixed-bmp-png48.png
fuzzy(1-1,407-407) == mixed-bmp-png.ico mixed-bmp-png48.png
+1 −1
Original line number Diff line number Diff line
@@ -25,5 +25,5 @@
== wrapper.html?xcrn0g04.ico about:blank

# Test ICO PNG transparency
== transparent-png.ico transparent-png.png
fuzzy(1-1,29-29) == transparent-png.ico transparent-png.png
Loading