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
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../js/resources/js-test-pre.js"></script>
<script src="resources/common-setrangetext.js"></script>
</head>
<body>
<script>
description("Test setRangeText() method on common input types.");
runTestsShouldPass("input", { type: "password" });
runTestsShouldPass("input", { type: "tel" });
runTestsShouldPass("input", { type: "text" });
runTestsShouldPass("input", { type: "text", dir: "rtl" });
runTestsShouldPass("input", { type: "url" });
debug("<hr>");
debug("Check that setRangeText() on disconnected elements doesn't crash and has proper values.");
element = document.createElement("input");
evalAndLog("element.value = '0123456789'");
evalAndLog("element.setRangeText('ABC', 0, 0, 'select')");
shouldBeEqualToString("element.value", "ABC0123456789");
runTestsShouldFail("input", { type: "button" });
runTestsShouldFail("input", { type: "checkbox" });
runTestsShouldFail("input", { type: "email" });
runTestsShouldFail("input", { type: "radio" });
runTestsShouldFail("input", { type: "reset" });
runTestsShouldFail("input", { type: "submit" });
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>
|