-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Picture-in-Picture] Fix web platform tests that time out.
This makes sure web platform tests for Picture-in-Picture do not time out when Picture-in-Picture API is not available. Besides, wpt/picture-in-picture/request-picture-in-picture is split to work around a flaky timeout in WPT upstream that's related to #10398 Note: based on #11329 Bug: 806249 Change-Id: I6185253dfa4aae5111e87553581b8464032558d1 Reviewed-on: https://chromium-review.googlesource.com/1107626 Reviewed-by: Robert Ma <[email protected]> Reviewed-by: Mounir Lamouri <[email protected]> Commit-Queue: François Beaufort <[email protected]> Cr-Commit-Position: refs/heads/master@{#576804}
- Loading branch information
Showing
6 changed files
with
36 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<title>Test request Picture-in-Picture on two videos</title> | ||
<script src="/resources/testharness.js"></script> | ||
<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 video1 = await loadVideo(); | ||
const video2 = await loadVideo(); | ||
return callWithTrustedClick(() => { | ||
const first = video1.requestPictureInPicture(); | ||
const second = video2.requestPictureInPicture(); | ||
return Promise.all([ | ||
first, | ||
promise_rejects(t, 'NotAllowedError', second) | ||
]); | ||
}); | ||
}, 'request Picture-in-Picture consumes user gesture'); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters