[Webkit-unassigned] [Bug 77899] IETC: FileList.item(-1) should return null instead of raising

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 3 23:22:07 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=77899





--- Comment #17 from Kinuko Yasuda <kinuko at chromium.org>  2012-06-03 23:22:06 PST ---
(In reply to comment #16)
> (In reply to comment #14)
> > > LayoutTests/fast/files/file-list-test.html:13
> > > +var caseArray = [["resources/UTF8.txt", "resources/UTF8-2.txt"], []];
> > 
> > Can we add a comment 'caseArray must end with an empty item' or something like that since the test code seems to rely on the assumption?
> 
> Using the expression "if (caseArray[globalIndex]].length == 0)" as you refered, It will not be a must that array ends with an empty.

I might want to check if ++caseIndex < caseArray.length before calling doTest then.

By the way I noticed something else. You're calling the next beginDragWithFiles directly from the file change event handler which is supposed to clear the dragged data 'after' the handler runs, and I think it could screw up the internal drag status (i.e. it'd fail on assertion if it runs in debug build).

I think you can simply loop over the test cases like:

 while (++caseIndex < caseArray.length)
   doTest(caseIndex);

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list