mirror of
https://github.com/servo/servo.git
synced 2025-09-17 02:18:23 +01:00
Update web-platform-tests to revision 5852f617c1ad109939bdb6b70f362dcd84a5cb73
This commit is contained in:
parent
c80c3f3167
commit
4375e3f248
44 changed files with 1103 additions and 114 deletions
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<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>
|
||||
promise_test(async t => {
|
||||
await test_driver.bless("request full screen", () => {
|
||||
return document.documentElement.requestFullscreen();
|
||||
});
|
||||
|
||||
const promiseToChange = new Promise(resolve => {
|
||||
screen.orientation.addEventListener("change", resolve);
|
||||
});
|
||||
|
||||
const result = await Promise.race([
|
||||
screen.orientation.lock("landscape"),
|
||||
promiseToChange
|
||||
]);
|
||||
|
||||
assert_true(result instanceof Event, "Expected an instance of Event");
|
||||
}, "The 'change' event must fire before the [[orientationPendingPromise]] is resolved.");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue