web-platform-tests / wpt

Test suites for Web platform specs — including WHATWG, W3C, and others
https://web-platform-tests.org/
Other
5.02k stars 3.12k forks source link

TypeError instead of NotAllowedError in navigator.clipboard.write(image/png DOMString) #49301

Open karlcow opened 1 day ago

karlcow commented 1 day ago

https://github.com/web-platform-tests/wpt/blob/92f1c298bc1d3c7915144d136c9b13c9be8e80e6/clipboard-apis/async-navigator-clipboard-basics.https.html#L156-L160

The current specificiation for write(data) https://w3c.github.io/clipboard-apis/#dom-clipboard-write

In Steps 4, it says:

  1. For each clipboardItem in dataList:

and then in 4.1.2.*

  1. If representationDataPromise was rejected, then: 1.Reject p with "NotAllowedError" DOMException in realm.
    1. Abort these steps.

Here the test is assessing a TypeError instead of NotAllowedError. Is there another step I'm missing?

@saschanaz @whsieh