2 <script src=
"../../resources/js-test.js"></script>
7 description("Tests that setting the value of input type=file throws and changing type resets.");
9 input
= document
.createElement("input");
10 document
.body
.appendChild(input
);
12 input
.value
= "example.txt";
13 shouldBeEqualToString("input.value", "example.txt");
15 shouldBeEqualToString("input.value", "");
16 shouldThrow('input.value = "foo"', '"InvalidStateError: Failed to set the \'value\' property on \'HTMLInputElement\': This input element accepts a filename, which may only be programmatically set to the empty string."');