summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/textfieldselection/textarea-selection-while-parsing.xhtml
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/semantics/forms/textfieldselection/textarea-selection-while-parsing.xhtml')
-rw-r--r--testing/web-platform/tests/html/semantics/forms/textfieldselection/textarea-selection-while-parsing.xhtml20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/forms/textfieldselection/textarea-selection-while-parsing.xhtml b/testing/web-platform/tests/html/semantics/forms/textfieldselection/textarea-selection-while-parsing.xhtml
new file mode 100644
index 0000000000..57326bb4a8
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/forms/textfieldselection/textarea-selection-while-parsing.xhtml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<textarea>
+a
+<script>document.querySelector('textarea').value = 'ggg';</script>
+b
+</textarea>
+<script>
+test(() => {
+ let ta = document.querySelector('textarea');
+ assert_equals(ta.selectionStart, 3);
+ assert_equals(ta.selectionEnd, 3);
+}, 'Value setter while parsing textarea children should move ' +
+ 'selection{Start,End} to the end');
+</script>
+</body>
+</html>