async clipboard: implement writeText (#36498)

Implement enough of the Clipboard API to have a working `writeText`.

Testing: Unfortunately many clipboard-apis tests require testdriver, so
only idlharness ones will pass now.

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24 2025-04-14 15:49:43 +02:00 committed by GitHub
parent c6dc7c83a8
commit 2bab5d8d52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 173 additions and 41 deletions

View file

@ -5,24 +5,6 @@
[ClipboardItem interface: operation supports(DOMString)]
expected: FAIL
[Clipboard interface: existence and properties of interface object]
expected: FAIL
[Clipboard interface object length]
expected: FAIL
[Clipboard interface object name]
expected: FAIL
[Clipboard interface: existence and properties of interface prototype object]
expected: FAIL
[Clipboard interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[Clipboard interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[Clipboard interface: operation read(optional ClipboardUnsanitizedFormats)]
expected: FAIL
@ -32,15 +14,6 @@
[Clipboard interface: operation write(ClipboardItems)]
expected: FAIL
[Clipboard interface: operation writeText(DOMString)]
expected: FAIL
[Clipboard must be primary interface of navigator.clipboard]
expected: FAIL
[Stringification of navigator.clipboard]
expected: FAIL
[Clipboard interface: navigator.clipboard must inherit property "read(optional ClipboardUnsanitizedFormats)" with the proper type]
expected: FAIL
@ -55,15 +28,3 @@
[Clipboard interface: calling write(ClipboardItems) on navigator.clipboard with too few arguments must throw TypeError]
expected: FAIL
[Clipboard interface: navigator.clipboard must inherit property "writeText(DOMString)" with the proper type]
expected: FAIL
[Clipboard interface: calling writeText(DOMString) on navigator.clipboard with too few arguments must throw TypeError]
expected: FAIL
[Navigator interface: attribute clipboard]
expected: FAIL
[Navigator interface: navigator must inherit property "clipboard" with the proper type]
expected: FAIL

View file

@ -13503,7 +13503,7 @@
]
],
"interfaces.https.html": [
"fbbffae39a346f592fabfe5ad3d943936a51c868",
"ff5d8e487822e1b9bf4dfd91ab814d2affaf457b",
[
null,
{}

View file

@ -38,6 +38,7 @@ test_interfaces([
"ChannelMergerNode",
"ChannelSplitterNode",
"CharacterData",
"Clipboard",
"ClipboardEvent",
"ClipboardItem",
"CloseEvent",