OLD | NEW |
1 To manually test, drag 'Drag Me' to 'Drop Here' and drop. Several lines that say
'PASS' should appear below. | 1 To manually test, drag 'Drag Me' to 'Drop Here' and drop. Several lines that say
'PASS' should appear below. |
2 | 2 |
3 Drag Me | 3 Drag Me |
4 Drop Here | 4 Drop Here |
5 Drag handler: | 5 Drag handler: |
6 Drop handler: | 6 Drop handler: |
| 7 Tests drag'n drop and well as DataTransferItemList |
| 8 |
| 9 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 10 |
| 11 |
7 Running test with Legacy drag handler and Legacy drop handler | 12 Running test with Legacy drag handler and Legacy drop handler |
8 PASS: 4 === 4 | 13 PASS testDataTransfer.types.length is 4 |
9 PASS: sample === sample | 14 PASS testDataTransfer.types.indexOf("text/plain") >= 0 is true |
10 PASS: http://www.google.com/ === http://www.google.com/ | 15 PASS testDataTransfer.types.indexOf("text/uri-list") >= 0 is true |
11 PASS: <em>Markup</em> === <em>Markup</em> | 16 PASS testDataTransfer.types.indexOf("text/html") >= 0 is true |
12 PASS: hello world === hello world | 17 PASS testDataTransfer.types.indexOf("custom-data") >= 0 is true |
| 18 PASS testDataTransfer.getData("text") is "sample" |
| 19 PASS testDataTransfer.getData("url") is "http://www.google.com/" |
| 20 PASS testDataTransfer.getData("text/html") is "<em>Markup</em>" |
| 21 PASS testDataTransfer.getData("custom-data") is "hello world" |
13 Running test with Legacy drag handler and DataTransferItemList drop handler | 22 Running test with Legacy drag handler and DataTransferItemList drop handler |
14 PASS: 4 === 4 | 23 PASS testDataTransfer.items.length is 4 |
15 PASS: [{"kind":"string","type":"custom-data"},{"kind":"string","type":"text/html
"},{"kind":"string","type":"text/plain"},{"kind":"string","type":"text/uri-list"
}] === [{"kind":"string","type":"custom-data"},{"kind":"string","type":"text/htm
l"},{"kind":"string","type":"text/plain"},{"kind":"string","type":"text/uri-list
"}] | 24 PASS JSON.stringify(expectedTypes) is JSON.stringify(types) |
16 PASS: hello world === hello world | 25 PASS testData is expectedTestData |
17 PASS: <em>Markup</em> === <em>Markup</em> | 26 PASS testData is expectedTestData |
18 PASS: sample === sample | 27 PASS testData is expectedTestData |
19 PASS: http://www.google.com/ === http://www.google.com/ | 28 PASS testData is expectedTestData |
20 Running test with DataTransferItemList drag handler and Legacy drop handler | 29 Running test with DataTransferItemList drag handler and Legacy drop handler |
21 PASS: 4 === 4 | 30 PASS testDataTransfer.items.add() threw exception TypeError: Not enough argument
s. |
22 PASS: sample === sample | 31 PASS testDataTransfer.items.add("sample") threw exception TypeError: Type error. |
23 PASS: http://www.google.com/ === http://www.google.com/ | 32 PASS testDataTransfer.types.length is 4 |
24 PASS: <em>Markup</em> === <em>Markup</em> | 33 PASS testDataTransfer.types.indexOf("text/plain") >= 0 is true |
25 PASS: hello world === hello world | 34 PASS testDataTransfer.types.indexOf("text/uri-list") >= 0 is true |
| 35 PASS testDataTransfer.types.indexOf("text/html") >= 0 is true |
| 36 PASS testDataTransfer.types.indexOf("custom-data") >= 0 is true |
| 37 PASS testDataTransfer.getData("text") is "sample" |
| 38 PASS testDataTransfer.getData("url") is "http://www.google.com/" |
| 39 PASS testDataTransfer.getData("text/html") is "<em>Markup</em>" |
| 40 PASS testDataTransfer.getData("custom-data") is "hello world" |
26 Running test with DataTransferItemList drag handler and DataTransferItemList dro
p handler | 41 Running test with DataTransferItemList drag handler and DataTransferItemList dro
p handler |
27 PASS: 4 === 4 | 42 PASS testDataTransfer.items.add() threw exception TypeError: Not enough argument
s. |
28 PASS: [{"kind":"string","type":"custom-data"},{"kind":"string","type":"text/html
"},{"kind":"string","type":"text/plain"},{"kind":"string","type":"text/uri-list"
}] === [{"kind":"string","type":"custom-data"},{"kind":"string","type":"text/htm
l"},{"kind":"string","type":"text/plain"},{"kind":"string","type":"text/uri-list
"}] | 43 PASS testDataTransfer.items.add("sample") threw exception TypeError: Type error. |
29 PASS: hello world === hello world | 44 PASS testDataTransfer.items.length is 4 |
30 PASS: <em>Markup</em> === <em>Markup</em> | 45 PASS JSON.stringify(expectedTypes) is JSON.stringify(types) |
31 PASS: sample === sample | 46 PASS testData is expectedTestData |
32 PASS: http://www.google.com/ === http://www.google.com/ | 47 PASS testData is expectedTestData |
| 48 PASS testData is expectedTestData |
| 49 PASS testData is expectedTestData |
| 50 PASS successfullyParsed is true |
33 | 51 |
| 52 TEST COMPLETE |
| 53 |
OLD | NEW |