| Tests access to event.dataTransfer.files and .types |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| Dragging no files should return an empty file list (arbitrary implementation detail): |
| On dragenter: |
| PASS event.dataTransfer.types does not contain Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types does not contain Files. |
| PASS event.dataTransfer.files.length is 0 |
| On drop: |
| PASS event.dataTransfer.types does not contain Files. |
| PASS event.dataTransfer.files.length is 0 |
| Drag drop a single (non-existant) file onto an element: |
| On dragenter: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On drop: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 1 |
| PASS event.dataTransfer.files[0].name is "DRTFakeFile" |
| PASS event.dataTransfer.files[0].size is 0 |
| FIXME: File.size always returns 0 for files dropped by eventSender.beginDragWithFiles from http tests: https://bugs.webkit.org/show_bug.cgi?id=25909 |
| Drag files over an element, leave that element and release the mouse: |
| On dragenter: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragleave: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| Drag drop a real file onto an element: |
| On dragenter: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On drop: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 1 |
| PASS event.dataTransfer.files[0].name is "apple.gif" |
| FAIL event.dataTransfer.files[0].size should be 1476. Was 0. |
| Drag drop two files onto an element: |
| On dragenter: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On drop: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 2 |
| PASS event.dataTransfer.files[0].name is "apple.gif" |
| FAIL event.dataTransfer.files[0].size should be 1476. Was 0. |
| PASS event.dataTransfer.files[1].name is "mozilla.gif" |
| FAIL event.dataTransfer.files[1].size should be 2593. Was 0. |
| Drag drop two files in reverse alphabetical order onto an element: |
| On dragenter: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On drop: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 2 |
| PASS event.dataTransfer.files[0].name is "mozilla.gif" |
| FAIL event.dataTransfer.files[0].size should be 2593. Was 0. |
| PASS event.dataTransfer.files[1].name is "apple.gif" |
| FAIL event.dataTransfer.files[1].size should be 1476. Was 0. |
| FIXME: We should not allow element to accept drops including directories unless https://bugs.webkit.org/show_bug.cgi?id=25879 is fixed to make directory File objects useful from JavaScript. The page is given File objects corresponding to directories, but form submission and xhr.send() will fail. |
| Drag drop a directory onto an element: |
| On dragenter: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On drop: |
| PASS event.dataTransfer.types contains Files. |
| FAIL event.dataTransfer.files.length should be 0. Was 1. |
| Drag drop a file and a directory onto an element: |
| On dragenter: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On drop: |
| PASS event.dataTransfer.types contains Files. |
| FAIL event.dataTransfer.files.length should be 0. Was 2. |
| Drag drop a directory and a file onto an element: |
| On dragenter: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On dragover: |
| PASS event.dataTransfer.types contains Files. |
| PASS event.dataTransfer.files.length is 0 |
| On drop: |
| PASS event.dataTransfer.types contains Files. |
| FAIL event.dataTransfer.files.length should be 0. Was 2. |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |