mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 0f31ab1b094596062154092307bb9ff8e6122533
This commit is contained in:
parent
96ad6710b1
commit
372e03fe64
32 changed files with 992 additions and 222 deletions
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Async Clipboard basic tests</title>
|
||||
<title>Async Clipboard input type validation tests</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
|
@ -46,6 +46,21 @@ promise_test(async t => {
|
|||
navigator.clipboard.writeText());
|
||||
}, "navigator.clipboard.writeText() fails (expect DOMString)");
|
||||
|
||||
/* clipboard.writeImageExperimental() */
|
||||
|
||||
promise_test(async () => {
|
||||
const fetched = await fetch(
|
||||
'http://localhost:8001/clipboard-apis/resources/greenbox.png');
|
||||
const image = await fetched.blob();
|
||||
|
||||
await navigator.clipboard.writeImageExperimental(image);
|
||||
}, "navigator.clipboard.writeImageExperimental(Blob) succeeds");
|
||||
|
||||
promise_test(async t => {
|
||||
await promise_rejects(t, new TypeError(),
|
||||
navigator.clipboard.writeImageExperimental());
|
||||
}, "navigator.clipboard.writeImageExperimental() fails (expect Blob)");
|
||||
|
||||
|
||||
/* clipboard.read() */
|
||||
|
||||
|
@ -62,4 +77,11 @@ promise_test(async () => {
|
|||
assert_equals(typeof result, "string");
|
||||
}, "navigator.clipboard.readText() succeeds");
|
||||
|
||||
/* clipboard.readImageExperimental() */
|
||||
|
||||
promise_test(async () => {
|
||||
const result = await navigator.clipboard.readImageExperimental();
|
||||
assert_equals(typeof result, "object");
|
||||
}, "navigator.clipboard.readImageExperimental() succeeds");
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue