1 This tests the basic functionality and properties of DataTransferItems for string data with drag and drop. This test requires DRT.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 Dragging text in source1: Lorem ipsum
7 Verifying contents of DataTransferItems...
10 items[0].type: text/plain
11 PASS currentItem.getAsString() threw exception TypeError: Failed to execute 'getAsString' on 'DataTransferItem': 1 argument required, but only 0 present..
12 PASS currentItem.getAsString(null) did not throw exception.
13 PASS stringData is "Lorem ipsum"
14 Dragging text in source2: http://example.com
15 Verifying contents of DataTransferItems...
18 items[0].type: text/plain
19 PASS currentItem.getAsString() threw exception TypeError: Failed to execute 'getAsString' on 'DataTransferItem': 1 argument required, but only 0 present..
20 PASS currentItem.getAsString(null) did not throw exception.
21 PASS stringData is "http://example.com"
22 PASS successfullyParsed is true
26 Drop text here if you test this manually