mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
Update web-platform-tests to revision ad219567030d1f99f7310f52a17546b57b70d29e
This commit is contained in:
parent
2c63d1296b
commit
a7e62acbe8
129 changed files with 4156 additions and 590 deletions
|
@ -1,6 +1,8 @@
|
|||
<!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>
|
||||
test(() => {
|
||||
screen.orientation.unlock();
|
||||
|
@ -12,11 +14,18 @@ test(() => {
|
|||
}, "Test that screen.orientation.unlock() returns a void value");
|
||||
|
||||
promise_test(async t => {
|
||||
await test_driver.bless("request full screen", () => {
|
||||
return document.documentElement.requestFullscreen();
|
||||
});
|
||||
const value = await screen.orientation.lock('any');
|
||||
assert_equals(value, undefined);
|
||||
return document.exitFullscreen();
|
||||
}, "Test that screen.orientation.lock returns a promise which will be fulfilled with a void value.");
|
||||
|
||||
promise_test(async t => {
|
||||
await test_driver.bless("request full screen", () => {
|
||||
return document.documentElement.requestFullscreen();
|
||||
});
|
||||
const orientations = [
|
||||
'any',
|
||||
'natural',
|
||||
|
@ -50,9 +59,13 @@ promise_test(async t => {
|
|||
}
|
||||
}
|
||||
screen.orientation.unlock();
|
||||
return document.exitFullscreen();
|
||||
}, "Test that screen.orientation.lock returns a pending promise.");
|
||||
|
||||
promise_test(async t => {
|
||||
await test_driver.bless("request full screen", () => {
|
||||
return document.documentElement.requestFullscreen();
|
||||
});
|
||||
const preType = screen.orientation.type;
|
||||
const isPortrait = preType.includes("portrait");
|
||||
const newType = `${ isPortrait ? "landscape" : "portrait" }-primary`;
|
||||
|
@ -60,5 +73,6 @@ promise_test(async t => {
|
|||
assert_equals(screen.orientation.type, preType, "Must not change orientation until next spin of event loop");
|
||||
await p;
|
||||
assert_equals(screen.orientation.type, newType);
|
||||
return document.exitFullscreen();
|
||||
}, "Test that screen.orientation.lock() is actually async");
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue