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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/files.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!doctype html>
2 <meta charset=utf-8>
3 <title>HTMLInputElement#files</title>
4 <script src="../../../../../../resources/testharness.js"></script>
5 <script src="../../../../../../resources/testharnessreport.js"></script>
6 <div id=log></div>
7 <script>
8 var types = [
9 "hidden",
10 "text",
11 "search",
12 "tel",
13 "url",
14 "email",
15 "password",
16 "datetime",
17 "date",
18 "month",
19 "week",
20 "time",
21 "datetime-local",
22 "number",
23 "range",
24 "color",
25 "checkbox",
26 "radio",
27 "submit",
28 "image",
29 "reset",
30 "button",
31 ];
32
33 types.forEach(function(type) {
34 test(function() {
35 var input = document.createElement("input");
36 input.type = type;
37 assert_equals(input.files, null, "files should be null");
38 }, "files for input type=" + type);
39 });
40
41 test(function() {
42 var input = document.createElement("input");
43 input.type = "file";
44 assert_not_equals(input.files, null);
45 assert_true(input.files instanceof FileList, "files should be a FileList");
46 var files = input.files;
47 assert_equals(input.files, files, "files should return the same object");
48 }, "files for input type=file");
49 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698