|
promise_test(async t => { |
|
await getPermissions(); |
|
const item = new ClipboardItem({'image/png': 'not an image'}); |
|
await promise_rejects_js(t, TypeError, navigator.clipboard.write([item])); |
|
}, 'navigator.clipboard.write(image/png DOMString) fails'); |
The current specificiation for write(data)
https://w3c.github.io/clipboard-apis/#dom-clipboard-write
In Steps 4, it says:
- For each clipboardItem in dataList:
and then in 4.1.2.*
- If representationDataPromise was rejected, then:
1.Reject p with "NotAllowedError" DOMException in realm.
2. Abort these steps.
Here the test is assessing a TypeError instead of NotAllowedError.
Is there another step I'm missing?
@saschanaz @whsieh
wpt/clipboard-apis/async-navigator-clipboard-basics.https.html
Lines 156 to 160 in 92f1c29
The current specificiation for write(data)
https://w3c.github.io/clipboard-apis/#dom-clipboard-write
In Steps 4, it says:
and then in 4.1.2.*
Here the test is assessing a TypeError instead of NotAllowedError.
Is there another step I'm missing?
@saschanaz @whsieh