diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/forms/textfieldselection/setSelectionRange.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/forms/textfieldselection/setSelectionRange.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/forms/textfieldselection/setSelectionRange.html b/testing/web-platform/tests/html/semantics/forms/textfieldselection/setSelectionRange.html new file mode 100644 index 0000000000..bdf52a77f8 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/forms/textfieldselection/setSelectionRange.html @@ -0,0 +1,18 @@ +<!doctype html> +<meta charset="utf-8"> +<title></title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<textarea> + +</textarea> +<script> +test(function() { + let textarea = document.querySelector('textarea'); + assert_equals(textarea.selectionStart, 0); + assert_equals(textarea.selectionEnd, 0); + textarea.setSelectionRange(0, 1); + assert_equals(textarea.selectionStart, 0); + assert_equals(textarea.selectionEnd, 1); +}, "setSelectionRange on line boundaries"); +</script> |