6 document
.getElementById("console").appendChild(document
.createTextNode(msg
+ "\n"));
9 function check(testNum
, expected
, actual
)
11 var msg
= "Test " + testNum
;
12 if (expected
== actual
)
15 msg
+= " failed. Expected: " + expected
+ " Actual: " + actual
;
21 if (window
.testRunner
)
22 testRunner
.dumpAsText();
24 var up1
= document
.getElementById("up1");
25 var up2
= document
.getElementById("up2");
27 check(1, up1
.multiple
, true);
28 check(2, up2
.multiple
, false);
33 check(3, up1
.multiple
, false);
34 check(4, up2
.multiple
, true);
36 check(5, up1
.getAttribute("multiple"), null);
37 check(6, up2
.getAttribute("multiple"), "");
41 <body onload=
"test()">
42 This tests that you can get and set the multiple attribute as a property in JavaScript.
<br>
43 <input type=
"file" id=
"up1" multiple
>
44 <input type=
"file" id=
"up2">
45 <pre id=
"console"></pre>