blob: 18e48799aa2d3442edf8f269add2b566d4ee985b [file] [log] [blame]
Tests for multi-file drag onto file input elements for https://bugs.webkit.org/show_bug.cgi?id=25862
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Dragging a single (non-existant) file to a file input control:
PASS fileInput.value is "C:\\fakepath\\DRTFakeFile"
PASS fileInput.files.length is 1
PASS fileInput.files[0].name is "DRTFakeFile"
PASS fileInput.files[0].type is ""
PASS fileInput.files[0].size is 0
Dragging a real file to a file input control:
PASS fileInput.value is "C:\\fakepath\\apple.gif"
PASS fileInput.files.length is 1
PASS fileInput.files[0].name is "apple.gif"
PASS fileInput.files[0].type is "image/gif"
PASS fileInput.files[0].size is 1476
Dragging a directory onto an file input control:
FAIL fileInput.value should be . Was C:\fakepath\directory-for-dragging.
FAIL fileInput.files.length should be 0. Was 1.
Dragging two files to a single-file input control:
PASS fileInput.value is ""
PASS fileInput.files.length is 0
Dragging a file and a directory onto a single-file input control:
PASS fileInput.value is ""
PASS fileInput.files.length is 0
FIXME: elements should refuse drags including directories: https://bugs.webkit.org/show_bug.cgi?id=25879. The page is given File objects corresponding to directories, but form submission will fail.
Dragging a directory and a file onto a single-file input control:
PASS fileInput.value is ""
PASS fileInput.files.length is 0
Dragging three files to a multi-file input control:
PASS fileInput.value is "C:\\fakepath\\apple.gif"
PASS fileInput.files.length is 3
PASS fileInput.files[0].name is "apple.gif"
PASS fileInput.files[0].type is "image/gif"
PASS fileInput.files[0].size is 1476
PASS fileInput.files[1].name is "mozilla.gif"
PASS fileInput.files[1].type is "image/gif"
PASS fileInput.files[1].size is 2593
PASS fileInput.files[2].name is "file.invalidext"
PASS fileInput.files[2].type is ""
PASS fileInput.files[2].size is 10
Dragging a file and a directory onto a mutli-file input control:
FAIL fileInput.value should be . Was C:\fakepath\apple.gif.
FAIL fileInput.files.length should be 0. Was 2.
FIXME: elements should refuse drags including directories: https://bugs.webkit.org/show_bug.cgi?id=25879. The page is given File objects corresponding to directories, but form submission will fail.
Dragging a directory and a file onto a mutli-file input control:
FAIL fileInput.value should be . Was C:\fakepath\directory-for-dragging.
FAIL fileInput.files.length should be 0. Was 2.
Dragging to a disabled file input control:
PASS fileInput.value is ""
PASS fileInput.files.length is 0
PASS successfullyParsed is true
TEST COMPLETE