Skip to content

[Clipboard API] DataError vs NotAllowedError for malformed image data. Spec bug or wrong WPT? #51814

Open
@karlcow

Description

@karlcow

await promise_rejects_dom(t, 'DataError',
navigator.clipboard.write([clipboardItemInput]));
}, 'Verify write error on malformed data [image/png ClipboardItem]');

  1. navigator.clipboard.write() is currently failing for malformed image data with NotAllowedError in Safari.
  2. All the failures in the specification are NotAllowedError https://w3c.github.io/clipboard-apis/#dom-clipboard-write
  3. WPT is expecting DataError https://github.com/web-platform-tests/wpt/blob/9cc1a33a76/clipboard-apis/async-write-image-read-image.https.html#L81-L83 which is passing on Chrome and Firefox

WPT issue or should the spec change?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions