blob: bbf01e05088e145c3d13964c90038e9ad94223d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script src="resources/file-drag-common.js"></script>
</head>
<body>
<input type="file" name="file" id="file">
<script>
description("This tests the value attribute in file input forms with page zoom in");
if (window.eventSender) {
eventSender.zoomPageIn();
eventSender.zoomPageIn();
eventSender.zoomPageIn();
}
if (window.testRunner) {
var file = document.getElementById("file");
dragFilesOntoInput(file, ["foo.txt"]);
shouldBeEqualToString("file.value", "C:\\fakepath\\foo.txt");
shouldBe("file.files.length", "1");
shouldThrow("file.value = 'foo'");
shouldBeEqualToString("file.value", "C:\\fakepath\\foo.txt");
shouldBe("file.files.length", "1");
file.value = "";
shouldBeEqualToString("file.value", "");
shouldBe("file.files.length", "0");
}
</script>
</body>
</html>
|