Bug 1494137 [wpt PR 13209] - Fix Picture-in-Picture test with User Activation V2, a=testonly
authorFrançois Beaufort <beaufort.francois@gmail.com>
Wed, 03 Oct 2018 09:30:26 +0000
changeset 495414 58ff6fcaae528bfd650028472f360f4c7a44a5a3
parent 495413 6fc7a610766c5398182c7aaebb13e00d82cf0a57
child 495415 0049a5019269c77d3b36ee0ed70aa54df10786e1
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1494137, 13209, 860718, 1244239, 594133
milestone64.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 1494137 [wpt PR 13209] - Fix Picture-in-Picture test with User Activation V2, a=testonly Automatic update from web-platform-testsFix Picture-in-Picture test with User Activation V2 With User Activation V2, the click activation is carried on to the following tests since the state is no longer stack-scoped. By re-ordering tests, this CL makes sure test doesn't fail when User Activation V2 is enabled. Bug: 860718 Change-Id: I54ebc6ca2d808323e4b87997b9687c56e2c8606d Reviewed-on: https://chromium-review.googlesource.com/1244239 Commit-Queue: Mounir Lamouri <mlamouri@chromium.org> Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Cr-Commit-Position: refs/heads/master@{#594133} -- wpt-commits: 59909759c4e16ea97804409f7612b7981662d48b wpt-pr: 13209
testing/web-platform/tests/picture-in-picture/request-picture-in-picture.html
--- a/testing/web-platform/tests/picture-in-picture/request-picture-in-picture.html
+++ b/testing/web-platform/tests/picture-in-picture/request-picture-in-picture.html
@@ -4,18 +4,18 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="/resources/testdriver.js"></script>
 <script src="/resources/testdriver-vendor.js"></script>
 <script src="resources/picture-in-picture-helpers.js"></script>
 <body></body>
 <script>
 promise_test(async t => {
   const video = await loadVideo();
-  return requestPictureInPictureWithTrustedClick(video);
-}, 'request Picture-in-Picture resolves on user click');
+  return promise_rejects(t, 'NotAllowedError', video.requestPictureInPicture());
+}, 'request Picture-in-Picture requires a user gesture');
 
 promise_test(t => {
   const video = document.createElement('video');
   return promise_rejects(t, 'InvalidStateError',
       requestPictureInPictureWithTrustedClick(video));
 }, 'request Picture-in-Picture requires loaded metadata for the video element');
 
 promise_test(async t => {
@@ -26,11 +26,11 @@ promise_test(async t => {
   }).then(() => {
     return promise_rejects(t, 'InvalidStateError',
       requestPictureInPictureWithTrustedClick(video));
   })
 }, 'request Picture-in-Picture requires video track for the video element');
 
 promise_test(async t => {
   const video = await loadVideo();
-  return promise_rejects(t, 'NotAllowedError', video.requestPictureInPicture());
-}, 'request Picture-in-Picture requires a user gesture');
+  return requestPictureInPictureWithTrustedClick(video);
+}, 'request Picture-in-Picture resolves on user click');
 </script>