blob: 704ab627e962f2476a21fa20e6b645a765b319e5 [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 to a disabled file input control:
PASS fileInput.value is ""
PASS fileInput.files.length is 0
Dragging a single (non-existant) file to a file input control:
PASS fileInput.value is "DRTFakeFile"
PASS fileInput.files.length is 1
PASS fileInput.files[0].fileName is "DRTFakeFile"
PASS fileInput.files[0].fileSize is 0
Dragging a real file to a file input control:
PASS fileInput.value is "apple.gif"
PASS fileInput.files.length is 1
PASS fileInput.files[0].fileName is "apple.gif"
PASS fileInput.files[0].fileSize is 1476
Dragging a directory onto an file input control:
FAIL fileInput.value should be . Was directory-for-dragging.
FAIL fileInput.files.length should be 0. Was 1.
FIXME: Single-file input elements should refuse multi-file drags. See https://bugs.webkit.org/show_bug.cgi?id=25913
Dragging two files to a single-file input control:
FAIL fileInput.value should be . Was apple.gif.
FAIL fileInput.files.length should be 0. Was 1.
Dragging a file and a directory onto a single-file input control:
FAIL fileInput.value should be . Was apple.gif.
FAIL fileInput.files.length should be 0. Was 1.
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:
FAIL fileInput.value should be . Was directory-for-dragging.
FAIL fileInput.files.length should be 0. Was 1.
Dragging two files to a multi-file input control:
PASS fileInput.value is "apple.gif"
PASS fileInput.files.length is 2
PASS fileInput.files[0].fileName is "apple.gif"
PASS fileInput.files[0].fileSize is 1476
PASS fileInput.files[1].fileName is "mozilla.gif"
PASS fileInput.files[1].fileSize is 2593
Dragging a file and a directory onto a mutli-file input control:
FAIL fileInput.value should be . Was 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 directory-for-dragging.
FAIL fileInput.files.length should be 0. Was 2.
PASS successfullyParsed is true
TEST COMPLETE