Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/file/input-file-write-files.html

Issue 1492523003: Drop [LegacyInterfaceTypeChecking] for HTMLInputElement.prototype.files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/file/input-file-write-files-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="resources/file-drag-common.js"></script> 5 <script src="resources/file-drag-common.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <input type="file" name="file1" id="file1"> 8 <input type="file" name="file1" id="file1">
9 <input type="file" name="file2" id="file2"> 9 <input type="file" name="file2" id="file2">
10 <script> 10 <script>
11 description("This tests the files attribute in file input forms"); 11 description("This tests the files attribute in file input forms");
12 12
13 if (window.testRunner) { 13 if (window.testRunner) {
14 var file1 = document.getElementById("file1"); 14 var file1 = document.getElementById("file1");
15 var file2 = document.getElementById("file2"); 15 var file2 = document.getElementById("file2");
16 dragFilesOntoInput(file1, ["foo.txt"]); 16 dragFilesOntoInput(file1, ["foo.txt"]);
17 dragFilesOntoInput(file2, ["bar.txt"]); 17 dragFilesOntoInput(file2, ["bar.txt"]);
18 shouldBe("file1.files.length", "1");
18 19
19 file1.files = "foo"; 20 shouldThrow("file1.files = 'foo'");
20 shouldBe("file1.files.length", "1");
21 shouldBeEqualToString("file1.files.item(0).name", "foo.txt");
22 21
23 file1.files = null; 22 file1.files = null;
24 shouldBe("file1.files.length", "1"); 23 shouldBe("file1.files.length", "1");
25 shouldBeEqualToString("file1.files.item(0).name", "foo.txt"); 24 shouldBeEqualToString("file1.files.item(0).name", "foo.txt");
26 25
27 // From current W3C spec, files attribute should be read only, 26 // From current W3C spec, files attribute should be read only,
28 // but WebKit implement it to be writable intentionally. 27 // but WebKit implement it to be writable intentionally.
29 // See: https://bugs.webkit.org/show_bug.cgi?id=87154#c15 28 // See: https://bugs.webkit.org/show_bug.cgi?id=87154#c15
30 file1.files = file2.files; 29 file1.files = file2.files;
31 shouldBe("file1.files.length", "1"); 30 shouldBe("file1.files.length", "1");
32 shouldBeEqualToString("file1.files.item(0).name", "bar.txt"); 31 shouldBeEqualToString("file1.files.item(0).name", "bar.txt");
33 } 32 }
34 </script> 33 </script>
35 </body> 34 </body>
36 </html> 35 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/file/input-file-write-files-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698