| <script src="../../../resources/js-test-pre.js"></script> |
| <input id="slider" type="range" min="0" max="100" value="30"> |
| <input id="defaults" type="range"> |
| <input id="step" type="range" step="20"> |
| description("<a href='http://bugs.webkit.org/show_bug.cgi?id=15251'>Bug 15251: REGRESSION: <input type=range> doesn't respond to form.reset() or setting input.value</a>"); |
| var slider; // Global needed for eval in shouldBe calls. |
| function testSliderReset(id) |
| slider = document.getElementById(id); |
| var originalValue = quoteNumber(slider.value); |
| debug("Current value is: " + originalValue); |
| shouldBe("slider.value", quoteNumber(80)); |
| document.forms[0].reset(); |
| shouldBe("slider.value", originalValue); |
| debug("Slider with explicit limits"); |
| testSliderReset("slider"); |
| debug("Slider with default limits, and no explicit value"); |
| testSliderReset("defaults"); |
| debug("Slider with default limits, and a step value"); |
| <script src="../../../resources/js-test-post.js"></script> |