Bug 1526617 [wpt PR 15247] - Do not require user gesture if pictureInPictureElement is set, a=testonly
☠☠ backed out by 749b314d6c28 ☠ ☠
authorFrançois Beaufort <beaufort.francois@gmail.com>
Mon, 18 Feb 2019 19:26:10 +0000
changeset 460290 2f27bcbec4869d7ceed7e81f7517faa1e0a75510
parent 460289 57f0ec9c514299d37537bc902e78b22baffffeb9
child 460291 1a8d89e21632c805a02865b1072b5bd05a72c429
push id112074
push userwptsync@mozilla.com
push dateThu, 21 Feb 2019 19:59:15 +0000
treeherdermozilla-inbound@a15983fcecca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1526617, 15247, 928697, 1454360, 630026
milestone67.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 1526617 [wpt PR 15247] - Do not require user gesture if pictureInPictureElement is set, a=testonly Automatic update from web-platform-tests Do not require user gesture if pictureInPictureElement is set Following https://github.com/WICG/picture-in-picture/issues/116, it would be great to allow video to enter Picture-in-Picture without user activation if there's already a visible PiP window in the context of the document, in other words if `document.pictureInPictureElement` is set. Bug: 928697 Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575 Reviewed-on: https://chromium-review.googlesource.com/c/1454360 Commit-Queue: Fran├žois Beaufort <beaufort.francois@gmail.com> Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Cr-Commit-Position: refs/heads/master@{#630026} -- wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411 wpt-pr: 15247
testing/web-platform/tests/picture-in-picture/request-picture-in-picture-twice.html
--- a/testing/web-platform/tests/picture-in-picture/request-picture-in-picture-twice.html
+++ b/testing/web-platform/tests/picture-in-picture/request-picture-in-picture-twice.html
@@ -11,9 +11,18 @@
 promise_test(async t => {
   const video1 = await loadVideo();
   const video2 = await loadVideo();
   await test_driver.bless('request Picture-in-Picture');
   const promise = video1.requestPictureInPicture();
   await promise_rejects(t, 'NotAllowedError', video2.requestPictureInPicture());
   return promise;
 }, 'request Picture-in-Picture consumes user gesture');
+
+promise_test(async t => {
+  const video1 = await loadVideo();
+  const video2 = await loadVideo();
+  await test_driver.bless('request Picture-in-Picture');
+  await video1.requestPictureInPicture();
+  assert_equals(document.pictureInPictureElement, video1);
+  return video2.requestPictureInPicture();
+}, 'request Picture-in-Picture does not require user gesture if document.pictureInPictureElement is set');
 </script>