LayoutTests/ChangeLog

 12010-01-21 Jian Li <jianli@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Add test for new attributes introduced in File and Blob interfaces.
 6 https://bugs.webkit.org/show_bug.cgi?id=33980
 7
 8 * editing/pasteboard/file-input-files-access-expected.txt:
 9 * editing/pasteboard/script-tests/file-input-files-access.js:
 10
1112010-01-21 Beth Dakin <bdakin@apple.com>
212
313 Rubber-stamped by Eric Seidel.

LayoutTests/editing/pasteboard/file-input-files-access-expected.txt

@@PASS fileInput.files.length is 0
99Dragging a single (non-existant) file to a file input control:
1010PASS fileInput.value is "DRTFakeFile"
1111PASS fileInput.files.length is 1
 12PASS fileInput.files[0].name is "DRTFakeFile"
 13PASS fileInput.files[0].size is 0
1214PASS fileInput.files[0].fileName is "DRTFakeFile"
1315PASS fileInput.files[0].fileSize is 0
1416Dragging a real file to a file input control:
1517PASS fileInput.value is "apple.gif"
1618PASS fileInput.files.length is 1
 19PASS fileInput.files[0].name is "apple.gif"
 20PASS fileInput.files[0].size is 1476
1721PASS fileInput.files[0].fileName is "apple.gif"
1822PASS fileInput.files[0].fileSize is 1476
1923Dragging a directory onto an file input control:

@@FAIL fileInput.files.length should be 0. Was 1.
3337Dragging two files to a multi-file input control:
3438PASS fileInput.value is "apple.gif"
3539PASS fileInput.files.length is 2
 40PASS fileInput.files[0].name is "apple.gif"
 41PASS fileInput.files[0].size is 1476
3642PASS fileInput.files[0].fileName is "apple.gif"
3743PASS fileInput.files[0].fileSize is 1476
 44PASS fileInput.files[1].name is "mozilla.gif"
 45PASS fileInput.files[1].size is 2593
3846PASS fileInput.files[1].fileName is "mozilla.gif"
3947PASS fileInput.files[1].fileSize is 2593
4048Dragging a file and a directory onto a mutli-file input control:

LayoutTests/editing/pasteboard/script-tests/file-input-files-access.js

@@function fileListShouldBe(fileListString, filesArray)
2626 shouldBe(fileListString + ".length", "" + filesArray.length);
2727 for (var x = 0; x < filesArray.length; x++) {
2828 var fileValueString = fileListString + "[" + x + "]";
 29 shouldBeEqualToString(fileValueString + ".name", filesArray[x]['name']);
 30 shouldBe(fileValueString + ".size", "" + filesArray[x]['size']);
 31
 32 // FIXME: to be removed after legacy attributes are removed.
2933 shouldBeEqualToString(fileValueString + ".fileName", filesArray[x]['name']);
3034 shouldBe(fileValueString + ".fileSize", "" + filesArray[x]['size']);
3135 }