Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / files / file-list-test.html
blob2125779ac89065843fa384e03bf4d54212119562
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <input type="file" multiple onchange="onInputFileChange(this.files)">
8 <div id="description"></div>
9 <div id="console"></div>
10 <script>
11 description("Test the attribute of FileList.");
13 debug("Start");
15 function onInputFileChange(files)
17 window.files = files;
18 shouldBeTrue("files instanceof FileList");
19 shouldBe("files.length", "2");
20 shouldBeTrue("files.item(0) instanceof File");
21 shouldBeEqualToString("files.item(0).name", "UTF8.txt");
22 shouldBeTrue("files.item(1) instanceof File");
23 shouldBeEqualToString("files.item(1).name", "UTF8-2.txt");
24 shouldBeNull("files.item(2)");
25 shouldBeNull("files.item(-1)");
26 shouldBeTrue("files.item(0) === files.item(4294967296)");
27 shouldBeTrue("files.item(1) === files.item(4294967297)");
28 shouldBeTrue("files.item(2) === files.item(4294967298)");
29 shouldBeTrue("files.item(-1) === files.item(4294967295)");
30 shouldBeTrue("files.item(-4294967295) === files.item(1)");
31 shouldBeTrue("files.item(-4294967296) === files.item(0)");
32 shouldBeTrue("files.item(null) === files.item(0)");
33 shouldBeTrue("files.item(undefined) === files.item(0)");
36 eventSender.beginDragWithFiles(["resources/UTF8.txt", "resources/UTF8-2.txt"]);
37 eventSender.mouseMoveTo(10, 10);
38 eventSender.mouseUp();
40 </script>
41 </body>
42 </html>