Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
await waitForUserActivation();
await navigator.clipboard.write([newItem]);

// Step 5: getType() on the now-stale item should reject with DataError,
// Step 5: getType() on the now-stale item should reject with InvalidStateError,
// even though the data was previously read and cached in step 3.
await promise_rejects_dom(t, 'DataError', item.getType('text/plain'));
}, 'getType() rejects with DataError on cached ClipboardItem after clipboard.write()');
await promise_rejects_dom(t, 'InvalidStateError', item.getType('text/plain'));
}, 'getType() rejects with InvalidStateError on cached ClipboardItem after clipboard.write()');
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
await waitForUserActivation();
await navigator.clipboard.write([newItem]);

// Step 4: getType() on the stale item should reject with DataError.
await promise_rejects_dom(t, 'DataError', staleItem.getType('text/plain'));
}, 'getType() rejects with DataError on stale ClipboardItem after clipboard.write()');
// Step 4: getType() on the stale item should reject with InvalidStateError.
await promise_rejects_dom(t, 'InvalidStateError', staleItem.getType('text/plain'));
}, 'getType() rejects with InvalidStateError on stale ClipboardItem after clipboard.write()');
</script>
Loading