Changeset 119466 in webkit
- Timestamp:
- Jun 5, 2012 1:12:59 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r119465 r119466 1 2012-06-05 Li Yin <li.yin@intel.com> 2 3 IETC: FileList.item(-1) should return null instead of raising 4 https://bugs.webkit.org/show_bug.cgi?id=77899 5 6 Reviewed by Kentaro Hara. 7 8 IETC: http://samples.msdn.microsoft.com/ietestcenter/fileapi/filelist.htm 9 Ref: http://es5.github.com/#x9.6 10 Some index values have been covered in this test, including negative index, 11 undefined, null, normal index(0~length-1), more than length index. 12 13 * fast/files/file-list-test-expected.txt: 14 * fast/files/file-list-test.html: 15 1 16 2012-06-05 Adam Barth <abarth@webkit.org> 2 17 -
trunk/LayoutTests/fast/files/file-list-test-expected.txt
r118787 r119466 10 10 PASS files.item(1) instanceof File is true 11 11 PASS files.item(1).name is "UTF8-2.txt" 12 PASS files.item(999) is null 12 PASS files.item(2) is null 13 PASS files.item(-1) is null 14 PASS files.item(0) === files.item(4294967296) is true 15 PASS files.item(1) === files.item(4294967297) is true 16 PASS files.item(2) === files.item(4294967298) is true 17 PASS files.item(-1) === files.item(4294967295) is true 18 PASS files.item(-4294967295) === files.item(1) is true 19 PASS files.item(-4294967296) === files.item(0) is true 20 PASS files.item(null) === files.item(0) is true 21 PASS files.item(undefined) === files.item(0) is true 13 22 PASS successfullyParsed is true 14 23 -
trunk/LayoutTests/fast/files/file-list-test.html
r118787 r119466 11 11 description("Test the attribute of FileList."); 12 12 13 debug("Start"); 14 13 15 function onInputFileChange(files) 14 16 { 15 17 window.files = files; 16 debug("Start");17 18 shouldBe("files.length", "2"); 18 19 shouldBeTrue("files.item(0) instanceof File"); 19 shouldBeEqualToString( 'files.item(0).name', 'UTF8.txt');20 shouldBeEqualToString("files.item(0).name", "UTF8.txt"); 20 21 shouldBeTrue("files.item(1) instanceof File"); 21 shouldBeEqualToString('files.item(1).name', 'UTF8-2.txt'); 22 shouldBeNull("files.item(999)"); 22 shouldBeEqualToString("files.item(1).name", "UTF8-2.txt"); 23 shouldBeNull("files.item(2)"); 24 shouldBeNull("files.item(-1)"); 25 shouldBeTrue("files.item(0) === files.item(4294967296)"); 26 shouldBeTrue("files.item(1) === files.item(4294967297)"); 27 shouldBeTrue("files.item(2) === files.item(4294967298)"); 28 shouldBeTrue("files.item(-1) === files.item(4294967295)"); 29 shouldBeTrue("files.item(-4294967295) === files.item(1)"); 30 shouldBeTrue("files.item(-4294967296) === files.item(0)"); 31 shouldBeTrue("files.item(null) === files.item(0)"); 32 shouldBeTrue("files.item(undefined) === files.item(0)"); 23 33 } 24 34 25 eventSender.beginDragWithFiles([ 'resources/UTF8.txt', 'resources/UTF8-2.txt']);35 eventSender.beginDragWithFiles(["resources/UTF8.txt", "resources/UTF8-2.txt"]); 26 36 eventSender.mouseMoveTo(10, 10); 27 37 eventSender.mouseUp(); -
trunk/Source/WebCore/ChangeLog
r119465 r119466 1 2012-06-05 Li Yin <li.yin@intel.com> 2 3 IETC: FileList.item(-1) should return null instead of raising 4 https://bugs.webkit.org/show_bug.cgi?id=77899 5 6 Reviewed by Kentaro Hara. 7 8 IETC: http://samples.msdn.microsoft.com/ietestcenter/fileapi/filelist.htm 9 Accroding to http://es5.github.com/#x9.6 10 When the index is negative, it should not raise exception. 11 Firefox and IE returns null when there is not indexth File object. 12 13 Test: fast/files/file-list-test.html 14 15 * fileapi/FileList.idl: 16 1 17 2012-06-05 Adam Barth <abarth@webkit.org> 2 18 -
trunk/Source/WebCore/fileapi/FileList.idl
r106798 r119466 31 31 ] FileList { 32 32 readonly attribute unsigned long length; 33 File item(in [IsIndex]unsigned long index);33 File item(in unsigned long index); 34 34 }; 35 35
Note: See TracChangeset
for help on using the changeset viewer.