Update html/semantics/forms WPT tests from upstream
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Oct 2019 22:07:55 +0000 (22:07 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Oct 2019 22:07:55 +0000 (22:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=203499

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Re-sync html/semantics/forms WPT tests from upstream 23c1462333cb99f.

* resources/import-expectations.json:
* web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2-expected.txt: Added.
* web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2.html: Added.
* web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3-expected.txt: Added.
* web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3.html: Added.
* web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-expected.txt: Added.
* web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit.html: Added.
* web-platform-tests/html/semantics/forms/form-submission-0/resources/form-submission.py: Added.
(main):
* web-platform-tests/html/semantics/forms/form-submission-0/resources/w3c-import.log:
* web-platform-tests/html/semantics/forms/form-submission-0/submit-entity-body.html:
* web-platform-tests/html/semantics/forms/form-submission-0/w3c-import.log:
* web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application.html:
* web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value-expected.html: Added.
* web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value.html: Added.
* web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log:

LayoutTests:

* TestExpectations:
Skip new ref-test that is failing.

* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-expected.txt:
Baseline existing WPT test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251677 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/resources/import-expectations.json
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/resources/form-submission.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/resources/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/submit-entity-body.html
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application.html
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log
LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-expected.txt
LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-expected.txt

index 7ab425e..087f011 100644 (file)
@@ -1,3 +1,17 @@
+2019-10-28  Chris Dumez  <cdumez@apple.com>
+
+        Update html/semantics/forms WPT tests from upstream
+        https://bugs.webkit.org/show_bug.cgi?id=203499
+
+        Reviewed by Ryosuke Niwa.
+
+        * TestExpectations:
+        Skip new ref-test that is failing.
+
+        * platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-expected.txt:
+        * platform/mac/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-expected.txt:
+        Baseline existing WPT test.
+
 2019-10-28  Yusuke Suzuki  <ysuzuki@apple.com>
 
         [JSC] Optimize Promise runtime functions
index 4ead8cc..7fc8594 100644 (file)
@@ -3916,6 +3916,8 @@ webkit.org/b/203336 imported/w3c/web-platform-tests/css/css-values/lh-unit-002.h
 webkit.org/b/203337 imported/w3c/web-platform-tests/css/css-values/vh-support-atviewport.html [ ImageOnlyFailure ]
 webkit.org/b/203338 imported/w3c/web-platform-tests/css/css-values/vh_not_refreshing_on_chrome.html [ ImageOnlyFailure ]
 
+webkit.org/b/202859 imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value.html [ ImageOnlyFailure ]
+
 # wpt css-position failures
 webkit.org/b/203445 [ Debug ] imported/w3c/web-platform-tests/css/css-position/position-absolute-container-dynamic-002.html [ Skip ]
 webkit.org/b/203445 [ Debug ] imported/w3c/web-platform-tests/css/css-position/position-absolute-crash-chrome-005.html [ Skip ]
index 6ace3df..2d5dff4 100644 (file)
@@ -1,3 +1,29 @@
+2019-10-28  Chris Dumez  <cdumez@apple.com>
+
+        Update html/semantics/forms WPT tests from upstream
+        https://bugs.webkit.org/show_bug.cgi?id=203499
+
+        Reviewed by Ryosuke Niwa.
+
+        Re-sync html/semantics/forms WPT tests from upstream 23c1462333cb99f.
+
+        * resources/import-expectations.json:
+        * web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2-expected.txt: Added.
+        * web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2.html: Added.
+        * web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3-expected.txt: Added.
+        * web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3.html: Added.
+        * web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-expected.txt: Added.
+        * web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit.html: Added.
+        * web-platform-tests/html/semantics/forms/form-submission-0/resources/form-submission.py: Added.
+        (main):
+        * web-platform-tests/html/semantics/forms/form-submission-0/resources/w3c-import.log:
+        * web-platform-tests/html/semantics/forms/form-submission-0/submit-entity-body.html:
+        * web-platform-tests/html/semantics/forms/form-submission-0/w3c-import.log:
+        * web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application.html:
+        * web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value-expected.html: Added.
+        * web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value.html: Added.
+        * web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log:
+
 2019-10-28  Simon Fraser  <simon.fraser@apple.com>
 
         Properties that take <position> should not accept 3 values
index 2047183..05e5927 100644 (file)
     "web-platform-tests/worklets": "skip", 
     "web-platform-tests/x-frame-options": "skip", 
     "web-platform-tests/xhr": "import"
-}
\ No newline at end of file
+}
diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2-expected.txt
new file mode 100644 (file)
index 0000000..a0a49d3
--- /dev/null
@@ -0,0 +1,8 @@
+This frame should stay blank
+
+This frame should navigate (to 404)
+
+
+
+PASS preventDefault should allow onclick submit() to succeed 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2.html
new file mode 100644 (file)
index 0000000..f0c9471
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<!-- The onclick submit() should *not* get superseded in this case by the
+     default action submit(), because onclick here calls preventDefault().
+  -->
+
+
+
+
+<label for=frame1 style="display:block">This frame should stay blank</label>
+<iframe name=frame1 id=frame1></iframe>
+<label for=frame2 style="display:block">This frame should navigate (to 404)</label>
+<iframe name=frame2 id=frame2></iframe>
+<form id="form1" target="frame2" action="nonexistent.html">
+  <input type=hidden name=navigated value=1>
+  <input id=submitbutton type=submit>
+</form>
+
+<script>
+let frame1 = document.getElementById('frame1');
+let frame2 = document.getElementById('frame2');
+
+async_test(t => {
+  window.addEventListener('load', () => {
+    frame1.addEventListener('load', t.step_func_done(() => {
+      assert_unreached("Frame1 should not get navigated by this test.");
+    }));
+    frame2.addEventListener('load', t.step_func_done(() => {
+      let params = (new URL(frame2.contentWindow.location)).searchParams;
+      let wasNavigated = !!params.get("navigated");
+      assert_true(wasNavigated);
+    }));
+    form1.addEventListener('click', t.step_func(() => {
+      form1.submit();
+      form1.target='frame1';
+      event.preventDefault();  // Prevent default here
+    }));
+    submitbutton.click();
+  });
+}, 'preventDefault should allow onclick submit() to succeed');
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3-expected.txt
new file mode 100644 (file)
index 0000000..10c21ee
--- /dev/null
@@ -0,0 +1,8 @@
+This frame should stay blank
+
+This frame should navigate (to 404)
+
+submit
+
+FAIL <button> should have the same double-submit protection as <input type=submit> assert_unreached: Frame1 should not get navigated by this test. Reached unreachable code
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3.html
new file mode 100644 (file)
index 0000000..1bad232
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<!-- <button> should have the same double-submit protection that
+     <input type=submit> has.
+  -->
+
+
+
+
+<label for=frame1 style="display:block">This frame should stay blank</label>
+<iframe name=frame1 id=frame1></iframe>
+<label for=frame2 style="display:block">This frame should navigate (to 404)</label>
+<iframe name=frame2 id=frame2></iframe>
+<form id="form1" target="frame1" action="nonexistent.html">
+  <input type=hidden name=navigated value=1>
+  <button id=submitbutton>submit</button>
+</form>
+
+<script>
+let frame1 = document.getElementById('frame1');
+let frame2 = document.getElementById('frame2');
+
+async_test(t => {
+  window.addEventListener('load', () => {
+    frame1.addEventListener('load', t.step_func_done(() => {
+      assert_unreached("Frame1 should not get navigated by this test.");
+    }));
+    frame2.addEventListener('load', t.step_func_done(() => {
+      let params = (new URL(frame2.contentWindow.location)).searchParams;
+      let wasNavigated = !!params.get("navigated");
+      assert_true(wasNavigated)
+    }));
+    form1.addEventListener('click', t.step_func(() => {
+      form1.submit();
+      form1.target='frame2';
+
+    }));
+    submitbutton.click();
+  });
+}, '<button> should have the same double-submit protection as <input type=submit>');
+
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-expected.txt
new file mode 100644 (file)
index 0000000..02317ac
--- /dev/null
@@ -0,0 +1,8 @@
+This frame should stay blank
+
+This frame should navigate (to 404)
+
+
+
+FAIL default submit action should supersede onclick submit() assert_unreached: Frame1 should not get navigated by this test. Reached unreachable code
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit.html
new file mode 100644 (file)
index 0000000..1102e30
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<!-- The onclick submit() should get superseded by the default
+     action submit(), which isn't preventDefaulted by onclick here.
+     This is per the Form Submission Algorithm [1], step 22.3, which
+     says that new planned navigations replace old planned navigations.
+    [1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm
+  -->
+
+<label for=frame1 style="display:block">This frame should stay blank</label>
+<iframe name=frame1 id=frame1></iframe>
+<label for=frame2 style="display:block">This frame should navigate (to 404)</label>
+<iframe name=frame2 id=frame2></iframe>
+<form id="form1" target="frame1" action="nonexistent.html">
+  <input type=hidden name=navigated value=1>
+  <input id=submitbutton type=submit>
+</form>
+
+<script>
+let frame1 = document.getElementById('frame1');
+let frame2 = document.getElementById('frame2');
+
+async_test(t => {
+  window.addEventListener('load', () => {
+    frame1.addEventListener('load', t.step_func_done(() => {
+      assert_unreached("Frame1 should not get navigated by this test.");
+    }));
+    frame2.addEventListener('load', t.step_func_done(() => {
+      let params = (new URL(frame2.contentWindow.location)).searchParams;
+      let wasNavigated = !!params.get("navigated");
+      assert_true(wasNavigated)
+    }));
+    form1.addEventListener('click', t.step_func(() => {
+      form1.submit();
+      form1.target='frame2';
+
+    }));
+    submitbutton.click();
+  });
+}, 'default submit action should supersede onclick submit()');
+
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/resources/form-submission.py b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/resources/form-submission.py
new file mode 100644 (file)
index 0000000..4678754
--- /dev/null
@@ -0,0 +1,10 @@
+def main(request, response):
+    if request.headers.get('Content-Type') == 'application/x-www-form-urlencoded':
+        result = request.body == 'foo=bara'
+    elif request.headers.get('Content-Type') == 'text/plain':
+        result = request.body == 'qux=baz\r\n'
+    else:
+        result = request.POST.first('foo') == 'bar'
+
+    return ([("Content-Type", "text/plain")],
+            "OK" if result else "FAIL")
index 8bc8835..7bd4158 100644 (file)
@@ -15,4 +15,5 @@ None
 ------------------------------------------------------------------------
 List of files:
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/resources/file-submission.py
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/resources/form-submission.py
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/resources/targetted-form.js
index 8363f39..f6f3858 100644 (file)
@@ -96,7 +96,7 @@ function run_simple_test() {
   var testframe = document.getElementById("testframe");
   var testdocument = testframe.contentWindow.document;
   testdocument.body.innerHTML =
-    "<form id=testform method=post action=\"form-submission.py\" enctype=\"" + test_obj.enctype + "\">" +
+    "<form id=testform method=post action=\"/html/semantics/forms/form-submission-0/resources/form-submission.py\" enctype=\"" + test_obj.enctype + "\">" +
     test_obj.input +
     test_obj.submitelement +
     "</form>";
index db28254..7bd356f 100644 (file)
@@ -19,6 +19,9 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-data-set-empty-file.window.js
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-data-set-usv-form.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-data-set-usv.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-2.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-echo.py
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-submission-algorithm.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/getactionurl.html
index 04b4fdd..d205ee8 100644 (file)
     var el = document.createElement("input");
     el.type = type;
 
+    if (el.type != type) {
+      // Type is not supported - don't bother with the following checks.
+      return;
+    }
+
     test(() => {
       assert_equals(el.selectionStart, null);
     }, `selectionStart on an input[type=${type}] returns null`);
@@ -70,7 +75,7 @@
     }, `selectionEnd on an input[type=${type}] returns a value`);
 
     test(() => {
-      assert_equals(el.selectionDirection, "none");
+      assert_in_array(el.selectionDirection, ["forward", "none"]);
     }, `selectionDirection on an input[type=${type}] returns a value`);
 
     test(() => {
diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value-expected.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value-expected.html
new file mode 100644 (file)
index 0000000..71a44cd
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<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>
+
+<input type=range min=0 max=10 value=2></input>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value.html
new file mode 100644 (file)
index 0000000..3a03a5b
--- /dev/null
@@ -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>
index fcc7452..40cf172 100644 (file)
@@ -64,6 +64,8 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-2.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-intrinsic-size-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-intrinsic-size.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/required_attribute.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/reset.html
index ca30b1b..0e4bf5b 100644 (file)
@@ -31,96 +31,6 @@ PASS setRangeText on an input[type=email] throws InvalidStateError
 FAIL setSelectionRange on an input[type=email] throws InvalidStateError assert_throws: function "function (){
         el.setSelectionRange(0, 1);
       }" did not throw
-FAIL selectionStart on an input[type=datetime-local] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=datetime-local] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=datetime-local] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=datetime-local] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=datetime-local] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=datetime-local] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=datetime-local] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=datetime-local] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
-FAIL selectionStart on an input[type=date] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=date] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=date] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=date] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=date] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=date] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=date] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=date] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
-FAIL selectionStart on an input[type=month] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=month] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=month] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=month] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=month] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=month] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=month] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=month] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
-FAIL selectionStart on an input[type=week] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=week] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=week] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=week] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=week] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=week] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=week] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=week] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
-FAIL selectionStart on an input[type=time] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=time] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=time] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=time] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=time] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=time] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=time] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=time] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
 FAIL selectionStart on an input[type=number] returns null assert_equals: expected (object) null but got (number) 0
 FAIL selectionEnd on an input[type=number] returns null assert_equals: expected (object) null but got (number) 0
 FAIL selectionDirection on an input[type=number] returns null assert_equals: expected (object) null but got (string) "none"
index 2ee60ae..a3b571d 100644 (file)
@@ -31,96 +31,6 @@ PASS setRangeText on an input[type=email] throws InvalidStateError
 FAIL setSelectionRange on an input[type=email] throws InvalidStateError assert_throws: function "function (){
         el.setSelectionRange(0, 1);
       }" did not throw
-FAIL selectionStart on an input[type=datetime-local] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=datetime-local] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=datetime-local] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=datetime-local] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=datetime-local] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=datetime-local] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=datetime-local] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=datetime-local] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
-FAIL selectionStart on an input[type=date] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=date] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=date] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=date] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=date] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=date] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=date] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=date] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
-FAIL selectionStart on an input[type=month] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=month] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=month] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=month] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=month] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=month] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=month] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=month] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
-FAIL selectionStart on an input[type=week] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=week] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=week] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=week] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=week] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=week] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=week] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=week] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
-FAIL selectionStart on an input[type=time] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=time] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=time] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=time] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=time] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=time] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=time] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=time] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
 FAIL selectionStart on an input[type=number] returns null assert_equals: expected (object) null but got (number) 0
 FAIL selectionEnd on an input[type=number] returns null assert_equals: expected (object) null but got (number) 0
 FAIL selectionDirection on an input[type=number] returns null assert_equals: expected (object) null but got (string) "none"
@@ -153,24 +63,6 @@ PASS setRangeText on an input[type=range] throws InvalidStateError
 FAIL setSelectionRange on an input[type=range] throws InvalidStateError assert_throws: function "function (){
         el.setSelectionRange(0, 1);
       }" threw object "TypeError: Type error" that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11
-FAIL selectionStart on an input[type=color] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionEnd on an input[type=color] returns null assert_equals: expected (object) null but got (number) 0
-FAIL selectionDirection on an input[type=color] returns null assert_equals: expected (object) null but got (string) "none"
-FAIL assigning selectionStart on an input[type=color] throws InvalidStateError assert_throws: function "function (){
-        el.selectionStart = 0;
-      }" did not throw
-FAIL assigning selectionEnd on an input[type=color] throws InvalidStateError assert_throws: function "function (){
-        el.selectionEnd = 0;
-      }" did not throw
-FAIL assigning selectionDirection on an input[type=color] throws InvalidStateError assert_throws: function "function (){
-        el.selectionDirection = 'none';
-      }" did not throw
-FAIL setRangeText on an input[type=color] throws InvalidStateError assert_throws: function "function (){
-        el.setRangeText("foobar");
-      }" did not throw
-FAIL setSelectionRange on an input[type=color] throws InvalidStateError assert_throws: function "function (){
-        el.setSelectionRange(0, 1);
-      }" did not throw
 FAIL selectionStart on an input[type=checkbox] returns null Type error
 FAIL selectionEnd on an input[type=checkbox] returns null Type error
 FAIL selectionDirection on an input[type=checkbox] returns null Type error