diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/forms/the-input-element/range-setattribute-value.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/forms/the-input-element/range-setattribute-value.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/forms/the-input-element/range-setattribute-value.html b/testing/web-platform/tests/html/semantics/forms/the-input-element/range-setattribute-value.html new file mode 100644 index 0000000000..3a03a5b6fe --- /dev/null +++ b/testing/web-platform/tests/html/semantics/forms/the-input-element/range-setattribute-value.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#the-input-element"> +<link rel="match" href="range-setattribute-value-ref.html"> +<title>range input element setAttribute value appearance</title> + +<p>Test passes if the range element below visually has its slider at 2/10 from the left</p> + +<script> +window.onload = () => { + + const input = document.createElement('input'); + input.type = 'range'; + input.min = 0; + input.max = 10; + document.body.appendChild(input); + + requestAnimationFrame(() => { + requestAnimationFrame(() => { + input.setAttribute('value', 2); + document.documentElement.classList.remove('reftest-wait'); + }); + }); +}; +</script> |