Merge pull request #9487 from w3c/sync_f4c864d0d84c7bcda451187a4a63be584252dfa5

Merge pull request #9487 from sync_f4c864d0d84c7bcda451187a4a63be584252dfa5
diff --git a/html/semantics/forms/textfieldselection/defaultSelection.html b/html/semantics/forms/textfieldselection/defaultSelection.html
new file mode 100644
index 0000000..eb9bb40
--- /dev/null
+++ b/html/semantics/forms/textfieldselection/defaultSelection.html
@@ -0,0 +1,35 @@
+<!doctype html>
+<meta charset="utf-8">
+<title></title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<textarea>g</textarea>
+<input type="text" value="foo">
+</input>
+<script>
+test(function() {
+    let textarea = document.querySelector('textarea');
+    assert_equals(textarea.selectionStart, 0);
+    assert_equals(textarea.selectionEnd, 0);
+}, "Default selectionStart and selectionEnd for textarea");
+
+test(function() {
+    let textarea = document.querySelector('input');
+    assert_equals(textarea.selectionStart, 0);
+    assert_equals(textarea.selectionEnd, 0);
+}, "Default selectionStart and selectionEnd for input");
+
+test(function() {
+    let textarea = document.querySelector('textarea');
+    textarea.value="g";
+    assert_equals(textarea.selectionStart, 0);
+    assert_equals(textarea.selectionEnd, 0);
+}, "selectionStart and selectionEnd do not change when same value set again");
+
+test(function() {
+    let textarea = document.querySelector('textarea');
+    textarea.value="G";
+    assert_equals(textarea.selectionStart, 1);
+    assert_equals(textarea.selectionEnd, 1);
+}, "selectionStart and selectionEnd change when value changed to upper case");
+</script>