5 <script src=
"../../resources/js-test.js"></script>
6 <script src=
"resources/common-setrangetext.js"></script>
10 description("Test setRangeText() method on common input types.");
12 runTestsShouldPass("input", { type
: "password" });
13 runTestsShouldPass("input", { type
: "tel" });
14 runTestsShouldPass("input", { type
: "text" });
15 runTestsShouldPass("input", { type
: "text", dir
: "rtl" });
16 runTestsShouldPass("input", { type
: "url" });
19 debug("Check that setRangeText() on disconnected elements doesn't crash and has proper values.");
20 element
= document
.createElement("input");
21 evalAndLog("element.value = '0123456789'");
22 evalAndLog("element.setRangeText('ABC', 0, 0, 'select')");
23 shouldBeEqualToString("element.value", "ABC0123456789");
25 runTestsShouldFail("input", { type
: "button" });
26 runTestsShouldFail("input", { type
: "checkbox" });
27 runTestsShouldFail("input", { type
: "email" });
28 runTestsShouldFail("input", { type
: "radio" });
29 runTestsShouldFail("input", { type
: "reset" });
30 runTestsShouldFail("input", { type
: "submit" });