Bug 1508834 [wpt PR 14146] - Draw something on canvas to trigger video autoplay, a=testonly
authorFrançois Beaufort <beaufort.francois@gmail.com>
Sat, 24 Nov 2018 10:28:52 +0000
changeset 507252 0b200eba03b5bcee5c37774dff25fa3a15d93cf5
parent 507251 21b7f7092b74af95c578469a6b13e4fd5449da51
child 507253 156e41c2308dcd4f365edfc83ec4ebc12a69e343
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1508834, 14146
milestone65.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 1508834 [wpt PR 14146] - Draw something on canvas to trigger video autoplay, a=testonly Automatic update from web-platform-testsMerge pull request #14146 from web-platform-tests/beaufortfrancois-patch-1 Draw something on canvas to trigger video autoplay -- wpt-commits: d5dcb9f1ed50f4e0147ab06a6077b9bb04dd21eb wpt-pr: 14146
testing/web-platform/tests/picture-in-picture/mediastream.html
--- a/testing/web-platform/tests/picture-in-picture/mediastream.html
+++ b/testing/web-platform/tests/picture-in-picture/mediastream.html
@@ -6,16 +6,17 @@
 <script src="/resources/testdriver-vendor.js"></script>
 <script src="resources/picture-in-picture-helpers.js"></script>
 <body></body>
 <script>
 promise_test(async t => {
   const canvas = document.createElement('canvas');
   const video = document.createElement('video');
   const mediastreamVideoLoadedPromise = new Promise((resolve, reject) => {
+    canvas.getContext('2d').fillRect(0, 0, canvas.width, canvas.height);
     video.autoplay = true;
     video.srcObject = canvas.captureStream(60 /* fps */);
     video.onloadedmetadata = () => {
       resolve(video);
     };
     video.onerror = error => {
       reject(error);
     };