Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / file / input-file-write-files.html
blob1613b24b956dd676f1a4699a387b2fe4e6c8f9c5
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script src="resources/file-drag-common.js"></script>
6 </head>
7 <body>
8 <input type="file" name="file1" id="file1">
9 <input type="file" name="file2" id="file2">
10 <script>
11 description("This tests the files attribute in file input forms");
13 if (window.testRunner) {
14 var file1 = document.getElementById("file1");
15 var file2 = document.getElementById("file2");
16 dragFilesOntoInput(file1, ["foo.txt"]);
17 dragFilesOntoInput(file2, ["bar.txt"]);
19 file1.files = "foo";
20 shouldBe("file1.files.length", "1");
21 shouldBeEqualToString("file1.files.item(0).name", "foo.txt");
23 file1.files = null;
24 shouldBe("file1.files.length", "1");
25 shouldBeEqualToString("file1.files.item(0).name", "foo.txt");
27 // From current W3C spec, files attribute should be read only,
28 // but WebKit implement it to be writable intentionally.
29 // See: https://bugs.webkit.org/show_bug.cgi?id=87154#c15
30 file1.files = file2.files;
31 shouldBe("file1.files.length", "1");
32 shouldBeEqualToString("file1.files.item(0).name", "bar.txt");
34 </script>
35 </body>
36 </html>