blob: 8052db338d20c0b8063940c00a69879be25ca1d1 [file] [log] [blame]
This file tests the basic functionality and properties of DataTransferItems. This test requires DRT.
Populating DataTransferItems...
Caught exception "NotSupportedError: Failed to execute 'add' on 'DataTransferItemList': An item already exists for type 'text/plain'." as expected.
Verifying contents of DataTransferItems...
items.length: 2
items[0].kind: string
items[0].type: text/plain
items[1].kind: string
items[1].type: text/html
Checking if items past the end of the collection can be indexed:
items[2] is undefined: undefined
Checking that a read-only DataTransferItems cannot be mutated...
items.length: 2
items[0].kind: string
items[0].type: text/plain
items[1].kind: string
items[1].type: text/html
items[2] is undefined: undefined
Testing if DataTransferItems can be accessed outside an event handler...
DataTransferItem accessed outside event handler!
copy: items[0] value: Hello World!
copy: items[1] value: <b>Hello World!
paste: items[0] value: This file tests the basic functionality and properties of DataTransferItems. This test requires DRT.
paste: items[1] value: <span style="color: rgb(0, 0, 0); font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">This file tests the basic functionality and properties of DataTransferItems. This test requires DRT.</span>