Bug 1643477 [wpt PR 23998] - Check for first frame in CreateImageBitmap, a=testonly
authorBlink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Mon, 22 Jun 2020 10:44:06 +0000
changeset 536844 66944f0e6639faca7de7b6df84da977b82abece0
parent 536843 5a3f0059da33e1dd983c6ff0b2ee27a82b31001b
child 536845 d55974431473f1bb534fbd4d20dc4e3c8004c39b
push id37533
push userdluca@mozilla.com
push dateTue, 23 Jun 2020 21:38:40 +0000
treeherdermozilla-central@d48aa0f0aa0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1643477, 23998, 1090960, 2231453, 775670
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1643477 [wpt PR 23998] - Check for first frame in CreateImageBitmap, a=testonly Automatic update from web-platform-tests Check for first frame in CreateImageBitmap (#23998) HTMLVideoElement::CreateImageBitmap is currently rejecting valid calls, when we have an available first frame, but the ready state hasn't been updated. This CL updates CreateImageBitmap to check for a valid frame, which amounts to having a first frame available. This CL also updates some WPTs to use preload=auto, to allow video elements to load without being visible, and yield expected results when calling CreateImageBitmap. Bug: 1090960 Change-Id: I21302a9c3433bf8218a75c3f6918bc20f4d36ca3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2231453 Auto-Submit: Thomas Guilbert <tguilbert@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Thomas Guilbert <tguilbert@chromium.org> Cr-Commit-Position: refs/heads/master@{#775670} Co-authored-by: Thomas Guilbert <tguilbert@chromium.org> -- wpt-commits: 55999f0667e5ae85e3bd80e6a1d2c6ff8eb6d988 wpt-pr: 23998
testing/web-platform/tests/html/canvas/resources/canvas-tests.js
--- a/testing/web-platform/tests/html/canvas/resources/canvas-tests.js
+++ b/testing/web-platform/tests/html/canvas/resources/canvas-tests.js
@@ -139,40 +139,43 @@ function forEachCanvasSource(crossOrigin
     },
 
     {
       name: "cross-origin HTMLVideoElement",
       factory: () => {
         return new Promise((resolve, reject) => {
           const video = document.createElement("video");
           video.oncanplaythrough = () => resolve(video);
+          video.preload = "auto";
           video.onerror = reject;
           video.src = getVideoURI(crossOriginUrl + "/media/movie_300");
         });
       },
     },
 
     {
       name: "redirected to cross-origin HTMLVideoElement",
       factory: () => {
         return new Promise((resolve, reject) => {
           const video = document.createElement("video");
           video.oncanplaythrough = () => resolve(video);
+          video.preload = "auto";
           video.onerror = reject;
           video.src = "/common/redirect.py?location=" + getVideoURI(crossOriginUrl + "/media/movie_300");
         });
       },
     },
 
     {
       name: "redirected to same-origin HTMLVideoElement",
       factory: () => {
         return new Promise((resolve, reject) => {
           const video = document.createElement("video");
           video.oncanplaythrough = () => resolve(video);
+          video.preload = "auto";
           video.onerror = reject;
           video.src = crossOriginUrl + "/common/redirect.py?location=" + getVideoURI(sameOriginUrl + "/media/movie_300");
         });
       },
     },
 
     {
       name: "unclean HTMLCanvasElement",