Commit 0271f047 authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Commit Bot

Import wpt@1f2505669c560dc8248867b4f1d32a26cae7864b

Using wpt-import in Chromium 6ff23b06.

Build: https://ci.chromium.org/buildbot/chromium.infra.cron/wpt-importer/11528

Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md

TBR=raphael.kubo.da.costa@intel.com

No-Export: true
Change-Id: Ibe46494f52534ad2da439936157d29b07e83c547
Reviewed-on: https://chromium-review.googlesource.com/899468
Commit-Queue: Blink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Reviewed-by: default avatarBlink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534203}
parent dc76fee1
...@@ -65,11 +65,12 @@ function makeDataUrlVideo() { ...@@ -65,11 +65,12 @@ function makeDataUrlVideo() {
function makeMakeHTMLImage(src) { function makeMakeHTMLImage(src) {
return function() { return function() {
return new Promise(resolve => { return new Promise((resolve, reject) => {
var img = new Image(); var img = new Image();
img.onload = function() { img.onload = function() {
resolve(img); resolve(img);
}; };
img.onerror = reject;
img.src = src; img.src = src;
}); });
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<script> <script>
function testCanvasDisplayingPattern(canvas, width, height) function testCanvasDisplayingPattern(canvas, width, height)
{ {
var tolerance = 5; // for creating ImageBitmap from a video, the tolerance needs to be high var tolerance = 10; // for creating ImageBitmap from a video, the tolerance needs to be high
const check = (x, y, r, g, b, a) => const check = (x, y, r, g, b, a) =>
_assertPixelApprox(canvas, x,y, r,g,b,a, `${x},${y}`, `${r},${g},${b},${a}`, tolerance); _assertPixelApprox(canvas, x,y, r,g,b,a, `${x},${y}`, `${r},${g},${b},${a}`, tolerance);
check(1 * width / 4, 1 * height / 4, 255,0,0,255); check(1 * width / 4, 1 * height / 4, 255,0,0,255);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment