| To manually test, press your browser shortcut for copy and then for paste. Several lines that say 'PASS' should appear below. |
| |
| Copy handler: |
| Legacy |
| DataTransferItemList |
| Paste handler: |
| Legacy |
| DataTransferItemList |
| |
| Tests copy / paste and DataTransferItemList |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| Running test with Legacy copy handler and Legacy paste handler |
| PASS testDataTransfer.getData("custom-data") is "hello world" |
| PASS testDataTransfer.clearData(nonConvertibleToString) threw exception Exception in toString(). |
| PASS testDataTransfer.getData("custom-data") is "hello world" |
| PASS testDataTransfer.types.length is 4 |
| PASS testDataTransfer.types.indexOf("text/plain") >= 0 is true |
| PASS testDataTransfer.types.indexOf("text/uri-list") >= 0 is true |
| PASS testDataTransfer.types.indexOf("text/html") >= 0 is true |
| PASS testDataTransfer.types.indexOf("custom-data") >= 0 is true |
| PASS testDataTransfer.getData("text") is "sample" |
| PASS testDataTransfer.getData("url") is "http://www.google.com/" |
| PASS testDataTransfer.getData("text/html") is "<em>Markup</em>" |
| PASS testDataTransfer.getData("custom-data") is "hello world" |
| Running test with Legacy copy handler and DataTransferItemList paste handler |
| PASS testDataTransfer.getData("custom-data") is "hello world" |
| PASS testDataTransfer.clearData(nonConvertibleToString) threw exception Exception in toString(). |
| PASS testDataTransfer.getData("custom-data") is "hello world" |
| PASS testDataTransfer.items.length is 4 |
| PASS JSON.stringify(expectedTypes) is JSON.stringify(types) |
| PASS testData is expectedTestData |
| PASS testData is expectedTestData |
| PASS testData is expectedTestData |
| PASS testData is expectedTestData |
| Running test with DataTransferItemList copy handler and Legacy paste handler |
| PASS testDataTransfer.items.item is undefined. |
| PASS testDataTransfer.types.length is 4 |
| PASS testDataTransfer.types.indexOf("text/plain") >= 0 is true |
| PASS testDataTransfer.types.indexOf("text/uri-list") >= 0 is true |
| PASS testDataTransfer.types.indexOf("text/html") >= 0 is true |
| PASS testDataTransfer.types.indexOf("custom-data") >= 0 is true |
| PASS testDataTransfer.getData("text") is "sample" |
| PASS testDataTransfer.getData("url") is "http://www.google.com/" |
| PASS testDataTransfer.getData("text/html") is "<em>Markup</em>" |
| PASS testDataTransfer.getData("custom-data") is "hello world" |
| Running test with DataTransferItemList copy handler and DataTransferItemList paste handler |
| PASS testDataTransfer.items.item is undefined. |
| PASS testDataTransfer.items.length is 4 |
| PASS JSON.stringify(expectedTypes) is JSON.stringify(types) |
| PASS testData is expectedTestData |
| PASS testData is expectedTestData |
| PASS testData is expectedTestData |
| PASS testData is expectedTestData |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |