Commit 2353ff72 authored by François Beaufort's avatar François Beaufort Committed by Commit Bot

Fix 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: default avatarMounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594133}
parent 9594a943
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<script> <script>
promise_test(async t => { promise_test(async t => {
const video = await loadVideo(); const video = await loadVideo();
return requestPictureInPictureWithTrustedClick(video); return promise_rejects(t, 'NotAllowedError', video.requestPictureInPicture());
}, 'request Picture-in-Picture resolves on user click'); }, 'request Picture-in-Picture requires a user gesture');
promise_test(t => { promise_test(t => {
const video = document.createElement('video'); const video = document.createElement('video');
...@@ -31,6 +31,6 @@ promise_test(async t => { ...@@ -31,6 +31,6 @@ promise_test(async t => {
promise_test(async t => { promise_test(async t => {
const video = await loadVideo(); const video = await loadVideo();
return promise_rejects(t, 'NotAllowedError', video.requestPictureInPicture()); return requestPictureInPictureWithTrustedClick(video);
}, 'request Picture-in-Picture requires a user gesture'); }, 'request Picture-in-Picture resolves on user click');
</script> </script>
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