IETC: FileList.item(-1) should return null instead of raising
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jun 2012 08:12:59 +0000 (08:12 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jun 2012 08:12:59 +0000 (08:12 +0000)
commitde1422fd30bea5ebed2c9b7b709fc5029dab2b63
treef46dcae9161616aad1db2155c33b8cedb535c296
parentee76a08adf82720d704586d5eae39d409d116ce5
IETC: FileList.item(-1) should return null instead of raising
https://bugs.webkit.org/show_bug.cgi?id=77899

Patch by Li Yin <li.yin@intel.com> on 2012-06-05
Reviewed by Kentaro Hara.

Source/WebCore:

IETC: http://samples.msdn.microsoft.com/ietestcenter/fileapi/filelist.htm
Accroding to http://es5.github.com/#x9.6
When the index is negative, it should not raise exception.
Firefox and IE returns null when there is not indexth File object.

Test: fast/files/file-list-test.html

* fileapi/FileList.idl:

LayoutTests:

IETC: http://samples.msdn.microsoft.com/ietestcenter/fileapi/filelist.htm
Ref: http://es5.github.com/#x9.6
Some index values have been covered in this test, including negative index,
undefined, null, normal index(0~length-1), more than length index.

* fast/files/file-list-test-expected.txt:
* fast/files/file-list-test.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/files/file-list-test-expected.txt
LayoutTests/fast/files/file-list-test.html
Source/WebCore/ChangeLog
Source/WebCore/fileapi/FileList.idl