summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/mozilla/tests/html/semantics/forms
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/mozilla/tests/html/semantics/forms')
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/form-submission-0/non-usv-filenames.window.js95
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/input-radio-key-navigation.html61
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/textfieldselection/selection-value-interactions.html217
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/input-activation-behavior.html103
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-01-notref.html3
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-01.html13
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-02-notref.html9
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-02.html14
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-03-ref.html7
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-03.html15
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-04-ref.html7
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-04.html14
-rw-r--r--testing/web-platform/mozilla/tests/html/semantics/forms/time-enter-keypress.html48
13 files changed, 606 insertions, 0 deletions
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/form-submission-0/non-usv-filenames.window.js b/testing/web-platform/mozilla/tests/html/semantics/forms/form-submission-0/non-usv-filenames.window.js
new file mode 100644
index 0000000000..9b5aa88abb
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/form-submission-0/non-usv-filenames.window.js
@@ -0,0 +1,95 @@
+// META: script=/html/semantics/forms/form-submission-0/enctypes-helper.js
+
+// This test is built on the same infrastructure as the WPT tests
+// urlencoded2.window.js, multipart-formdata.window.js and text-plain.window.js,
+// except modified because this file only tests the serialization of filenames.
+// See the enctypes-helper.js file in the regular WPT test suite for more info.
+
+// The `urlencoded`, `multipart` and `textPlain` functions take a `file`
+// property rather than `name` and `value` properties, and the value of
+// `expected` is the serialization of the filename in the given encoding.
+
+function formSubmissionTemplate2(enctype, expectedBuilder) {
+ const formTestFn = formSubmissionTemplate(enctype, expectedBuilder);
+ return ({ file, formEncoding, expected, description }) =>
+ formTestFn({ name: "a", value: file, formEncoding, expected, description });
+}
+
+const urlencoded = formSubmissionTemplate2(
+ "application/x-www-form-urlencoded",
+ filename => `a=${filename}`
+);
+const multipart = formSubmissionTemplate2(
+ "multipart/form-data",
+ (filename, serialized) => {
+ const boundary = serialized.split("\r\n")[0];
+ return [
+ boundary,
+ `Content-Disposition: form-data; name="a"; filename="${filename}"`,
+ "Content-Type: text/plain",
+ "",
+ "", // File contents
+ `${boundary}--`,
+ "",
+ ].join("\r\n");
+ }
+);
+const textPlain = formSubmissionTemplate2(
+ "text/plain",
+ filename => `a=${filename}\r\n`
+);
+
+// -----------------------------------------------------------------------------
+
+(async () => {
+ // This creates an empty filesystem file with an arbitrary name and returns it
+ // as a File object with name "a\uD800b".
+ const file = SpecialPowers.unwrap(
+ await SpecialPowers.createFiles(
+ [{ data: "", options: { name: "a\uD800b", type: "text/plain" } }],
+ files => files[0]
+ )
+ );
+
+ urlencoded({
+ file,
+ formEncoding: "UTF-8",
+ expected: "a%EF%BF%BDb",
+ description: "lone surrogate in filename, UTF-8",
+ });
+
+ urlencoded({
+ file,
+ formEncoding: "windows-1252",
+ expected: "a%26%2365533%3Bb",
+ description: "lone surrogate in filename, windows-1252",
+ });
+
+ multipart({
+ file,
+ formEncoding: "UTF-8",
+ expected: "a\xEF\xBF\xBDb",
+ description: "lone surrogate in filename, UTF-8",
+ });
+
+ multipart({
+ file,
+ formEncoding: "windows-1252",
+ expected: "a�b",
+ description: "lone surrogate in filename, windows-1252",
+ });
+
+ textPlain({
+ file,
+ formEncoding: "UTF-8",
+ expected: "a\xEF\xBF\xBDb",
+ description: "lone surrogate in filename, UTF-8",
+ });
+
+ textPlain({
+ file,
+ formEncoding: "windows-1252",
+ expected: "a�b",
+ description: "lone surrogate in filename, windows-1252",
+ });
+})();
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/input-radio-key-navigation.html b/testing/web-platform/mozilla/tests/html/semantics/forms/input-radio-key-navigation.html
new file mode 100644
index 0000000000..2eee99ffaf
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/input-radio-key-navigation.html
@@ -0,0 +1,61 @@
+<!doctype html>
+<title>Keyboard navigation on input type=radio</title>
+<meta charset=utf-8>
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://mozilla.org" title="Mozilla">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+
+<form dir="ltr">
+ <input type=radio name=whatever value=1>
+ <input type=radio name=whatever value=2>
+ <input type=radio name=whatever value=3>
+</form>
+<form dir="rtl">
+ <input type=radio name=whatever value=1>
+ <input type=radio name=whatever value=2>
+ <input type=radio name=whatever value=3>
+</form>
+<script>
+const KEYS = {
+ ArrowLeft: '\uE012',
+ ArrowUp: '\uE013',
+ ArrowRight: '\uE014',
+ ArrowDown: '\uE015',
+};
+
+function nextFocusIndex(currentIndex, length, forward) {
+ if (forward) {
+ return (currentIndex + 1) % length;
+ }
+ return (currentIndex == 0 ? length : currentIndex) - 1;
+}
+
+async function testMove(form, keyName, forward) {
+ let radios = form.querySelectorAll("input[type=radio]");
+ assert_equals(radios.length, 3, "Sanity check");
+
+ let focusIndex = 1;
+ radios[focusIndex].focus();
+
+ // Enough to wrap around, and one more to test the last active element too.
+ for (let i = 0; i <= radios.length; ++i) {
+ assert_equals(document.activeElement, radios[focusIndex], `Focused expected radio input (${focusIndex})`);
+ await test_driver.send_keys(document.activeElement, KEYS[keyName]);
+ focusIndex = nextFocusIndex(focusIndex, radios.length, forward);
+ }
+}
+
+promise_test(async t => {
+ for (let form of document.querySelectorAll("form")) {
+ const rtl = form.dir == "rtl";
+ await testMove(form, "ArrowDown", /* forward = */ true);
+ await testMove(form, "ArrowUp", /* forward = */ false);
+ await testMove(form, "ArrowLeft", /* forward = */ rtl);
+ await testMove(form, "ArrowRight", /* forward = */ !rtl);
+ }
+});
+</script>
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/textfieldselection/selection-value-interactions.html b/testing/web-platform/mozilla/tests/html/semantics/forms/textfieldselection/selection-value-interactions.html
new file mode 100644
index 0000000000..c6ba07f746
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/textfieldselection/selection-value-interactions.html
@@ -0,0 +1,217 @@
+<!doctype html>
+<meta charset=utf-8>
+<title></title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<div id=log></div>
+<div id=target></div>
+<script>
+ var target = document.getElementById("target");
+ var sometext = "something";
+ var shorttext = "abc";
+ var elemData = [
+ {
+ desc: "textarea not in body",
+ factory: () => document.createElement("textarea"),
+ },
+ {
+ desc: "input not in body",
+ factory: () => document.createElement("input"),
+ },
+ {
+ desc: "textarea in body",
+ factory: () => document.body.appendChild(document.createElement("textarea")),
+ },
+ {
+ desc: "input in body",
+ factory: () => document.body.appendChild(document.createElement("input")),
+ },
+ {
+ desc: "textarea in body with parsed default value",
+ factory: () => {
+ target.innerHTML = "<textarea>abcdefghij</textarea>"
+ return target.querySelector("textarea");
+ },
+ },
+ {
+ desc: "input in body with parsed default value",
+ factory: () => {
+ target.innerHTML = "<input value='abcdefghij'>"
+ return target.querySelector("input");
+ },
+ },
+ {
+ desc: "focused textarea",
+ factory: () => {
+ var t = document.body.appendChild(document.createElement("textarea"));
+ t.focus();
+ return t;
+ },
+ },
+ {
+ desc: "focused input",
+ factory: () => {
+ var i = document.body.appendChild(document.createElement("input"));
+ i.focus();
+ return i;
+ },
+ },
+ {
+ desc: "focused then blurred textarea",
+ factory: () => {
+ var t = document.body.appendChild(document.createElement("textarea"));
+ t.focus();
+ t.blur();
+ return t;
+ },
+ },
+ {
+ desc: "focused then blurred input",
+ factory: () => {
+ var i = document.body.appendChild(document.createElement("input"));
+ i.focus();
+ i.blur()
+ return i;
+ },
+ },
+ ];
+
+for (var data of elemData) {
+ test(function() {
+ var el = data.factory();
+ this.add_cleanup(() => el.remove());
+ assert_equals(el.selectionStart, 0,
+ `Cursor start should be at beginning of ${data.desc}`);
+ assert_equals(el.selectionEnd, 0,
+ `Cursor end should be at beginning of ${data.desc}`);
+ }, `cursor location for initial value of ${data.desc}`);
+}
+
+for (var data of elemData) {
+ test(function() {
+ var el = data.factory();
+ this.add_cleanup(() => el.remove());
+ el.defaultValue = sometext;
+ // The "focused or has been focused" case behaves differently.
+ if (data.desc.includes("focused")) {
+ assert_equals(el.selectionStart, el.value.length,
+ `Cursor start should be at end of ${data.desc}`);
+ assert_equals(el.selectionEnd, el.value.length,
+ `Cursor end should be at end of ${data.desc}`);
+ } else {
+ assert_equals(el.selectionStart, 0,
+ `Cursor start should be at beginning of ${data.desc}`);
+ assert_equals(el.selectionEnd, 0,
+ `Cursor end should be at beginning of ${data.desc}`);
+ }
+ }, `cursor location after defaultValue set of ${data.desc}`);
+}
+
+for (var data of elemData) {
+ test(function() {
+ var el = data.factory();
+ this.add_cleanup(() => el.remove());
+ el.selectionStart = el.selectionStart;
+ el.defaultValue = sometext;
+ // The focused case behaves differently.
+ if (data.desc.includes("focused")) {
+ assert_equals(el.selectionStart, el.value.length,
+ `Cursor start should be at end of ${data.desc}`);
+ assert_equals(el.selectionEnd, el.value.length,
+ `Cursor end should be at end of ${data.desc}`);
+ } else {
+ assert_equals(el.selectionStart, 0,
+ `Cursor start should be at beginning of ${data.desc}`);
+ assert_equals(el.selectionEnd, 0,
+ `Cursor end should be at beginning of ${data.desc}`);
+ }
+ }, `cursor location after defaultValue set after no-op selectionStart set of ${data.desc}`);
+}
+
+for (var data of elemData) {
+ test(function() {
+ var el = data.factory();
+ this.add_cleanup(() => el.remove());
+ el.value = sometext;
+ assert_equals(el.selectionStart, sometext.length,
+ `Cursor start should be at end of ${data.desc}`);
+ assert_equals(el.selectionEnd, sometext.length,
+ `Cursor end should be at end of ${data.desc}`);
+ }, `cursor location after value set of ${data.desc}`);
+}
+
+for (var data of elemData) {
+ test(function() {
+ var el = data.factory();
+ this.add_cleanup(() => el.remove());
+ assert_true(sometext.length > 8,
+ "sometext too short, test won't work right");
+ el.defaultValue = sometext;
+ el.selectionStart = 1;
+ el.selectionEnd = 8;
+ assert_equals(el.selectionStart, 1, "We just set selectionStart!");
+ assert_equals(el.selectionEnd, 8, "We just set selectionEnd!");
+ assert_true(shorttext.length > 1,
+ "shorttext too short, test won't work right");
+ assert_true(shorttext.length < 8,
+ "shorttext too long, test won't work right");
+ el.defaultValue = shorttext;
+ // The "focused or has been focused" case behaves differently.
+ if (data.desc.includes("focused")) {
+ assert_equals(el.selectionStart, el.value.length,
+ `Cursor start should be at end of ${data.desc}`);
+ assert_equals(el.selectionEnd, el.value.length,
+ `Cursor end should be at end of ${data.desc}`);
+ } else {
+ if (el.tagName.toLowerCase() === "textarea") {
+ assert_equals(el.selectionStart, 0,
+ "Selection should be collapsed to the beginning");
+ assert_equals(el.selectionEnd, 0,
+ "Selection should be collapsed to the beginning");
+ } else {
+ assert_equals(el.selectionStart, 1,
+ "Shouldn't have moved selection start");
+ assert_equals(el.selectionEnd, shorttext.length,
+ "Should have adjusted selection end");
+ }
+ }
+ }, `selection location after defaultValue set to shorter than selectionEnd of ${data.desc}`);
+}
+
+for (var data of elemData) {
+ test(function() {
+ var el = data.factory();
+ this.add_cleanup(() => el.remove());
+ assert_true(sometext.length > 8,
+ "sometext too short, test won't work right");
+ el.defaultValue = sometext;
+ el.selectionStart = 5;
+ el.selectionEnd = 8;
+ assert_equals(el.selectionStart, 5, "We just set selectionStart!");
+ assert_equals(el.selectionEnd, 8, "We just set selectionEnd!");
+ assert_true(shorttext.length < 5,
+ "shorttext too long, test won't work right");
+ el.defaultValue = shorttext;
+ // The "focused or has been focused" case behaves differently.
+ if (data.desc.includes("focused")) {
+ assert_equals(el.selectionStart, el.value.length,
+ `Cursor start should be at end of ${data.desc}`);
+ assert_equals(el.selectionEnd, el.value.length,
+ `Cursor end should be at end of ${data.desc}`);
+ } else {
+ if (el.tagName.toLowerCase() === "textarea") {
+ assert_equals(el.selectionStart,0,
+ "Selection should be collapsed to the beginning");
+ assert_equals(el.selectionEnd, 0,
+ "Selection should be collapsed to the beginning");
+ } else {
+ assert_equals(el.selectionStart, shorttext.length,
+ "Should have adjusted selection start");
+ assert_equals(el.selectionEnd, shorttext.length,
+ "Should have adjusted selection end");
+ }
+ }
+ }, `selection location after defaultValue set to shorter than selectionStart of ${data.desc}`);
+}
+
+</script>
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/input-activation-behavior.html b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/input-activation-behavior.html
new file mode 100644
index 0000000000..d0ff8fd666
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/input-activation-behavior.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Activation behavior of input</title>
+<link rel="help" href="https://dom.spec.whatwg.org/#eventtarget-activation-behavior">
+<link rel="help" href="https://dom.spec.whatwg.org/#concept-event-dispatch">
+<link rel="help" href="https://html.spec.whatwg.org/#the-input-element">
+<link rel="help" href="https://github.com/whatwg/html/issues/1568">
+<link rel="help" href="https://github.com/whatwg/html/issues/1576">
+<link rel="help" href="https://github.com/whatwg/html/issues/10032">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id=log></div>
+
+<div id=test_container>
+ <a href="javascript:activated(document.querySelector('a'))" class="target"></a>
+ <area href="javascript:activated(document.querySelector('area'))" class="target">
+</div>
+
+<script>
+let activations = [];
+function activated(e) {
+ activations.push(e);
+}
+
+function testActivation(inputType, hasFormOwner, followTheParentLink) {
+ const elements = document.getElementsByClassName("target");
+ for (const anchor of elements) {
+ promise_test(async t => {
+ const input = document.createElement("input");
+ input.type = inputType;
+ input.oninput = function (e) {
+ activated(this);
+ };
+
+ if (hasFormOwner) {
+ const form = document.createElement("form");
+ form.onsubmit = function (e) {
+ activated(this.firstElementChild);
+ e.preventDefault();
+ return false;
+ };
+ form.onreset = function (e) {
+ activated(this.firstElementChild);
+ };
+ form.appendChild(input);
+ anchor.appendChild(form);
+ t.add_cleanup(function() {
+ form.remove();
+ activations = [];
+ });
+ } else {
+ anchor.appendChild(input);
+ t.add_cleanup(function() {
+ input.remove();
+ activations = [];
+ });
+ }
+
+ input.click();
+
+ // This is for a/area where JavaScript is executed in a queued task.
+ await new Promise(resolve => {
+ t.step_timeout(() => {
+ t.step_timeout(() => {
+ // All browser doesn't follow the spec for input button, see
+ // https://github.com/whatwg/html/issues/1576.
+ assert_array_equals(activations, [followTheParentLink ? anchor : input]);
+ if (inputType == "checkbox" || inputType == "radio") {
+ assert_equals(input.checked, true, "check input.checked");
+ }
+ resolve();
+ }, 0);
+ }, 0);
+ });
+ }, `Click child input ${inputType} ${hasFormOwner ? "with" : "without"} form owner ` +
+ `of parent ${anchor.tagName}, activation target should be ${followTheParentLink ? anchor.tagName : "input"}`);
+ }
+}
+
+// Click input types without form owner should not follow the parent link.
+const TypesWithoutFormOwnerNotFollowParentLink = ["checkbox", "radio"];
+for (const type of TypesWithoutFormOwnerNotFollowParentLink) {
+ testActivation(type, false /* hasFormOwner */, false /* followTheParentLink */);
+}
+
+// Click input types without form owner should follow the parent link.
+const TypesWithoutFormOwnerFollowParentLink = ["button", "reset", "submit"];
+for (const type of TypesWithoutFormOwnerFollowParentLink) {
+ testActivation(type, false /* hasFormOwner */, true /* followTheParentLink */);
+}
+
+// Click input types with form owner should not follow the parent link.
+const TypesWithFormOwnerNotFollowParentLink = ["submit", "reset", "checkbox", "radio"];
+for (const type of TypesWithFormOwnerNotFollowParentLink) {
+ testActivation(type, true /* hasFormOwner */, false /* followTheParentLink */);
+}
+
+// Click input types with form owner should follow the parent link.
+const TypesWithFormOwnerFollowParentLink = ["button"];
+for (const type of TypesWithFormOwnerFollowParentLink) {
+ testActivation(type, true /* hasFormOwner */, true /* followTheParentLink */);
+}
+</script>
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-01-notref.html b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-01-notref.html
new file mode 100644
index 0000000000..67591468cf
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-01-notref.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<title>vertical range input with datalist reference</title>
+<input type="range" orient="vertical" min="-100" max="100" value="0" step="10" name="power" list="powers">
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-01.html b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-01.html
new file mode 100644
index 0000000000..f1bd96f391
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-01.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<title>vertical range input with datalist</title>
+<link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#range-state-(type=range)">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=841942">
+<link rel="author" href="mailto:zach@zrhoffman.net" title="Zach Hoffman">
+<link rel="mismatch" href="range-tick-marks-01-notref.html">
+<input type="range" orient="vertical" min="-100" max="100" value="0" step="10" name="power" list="powers">
+<datalist id="powers">
+ <option value="0">
+ <option value="-30">
+ <option value="30">
+ <option value="50">
+</datalist>
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-02-notref.html b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-02-notref.html
new file mode 100644
index 0000000000..59acde1482
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-02-notref.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<title>max and min attributes applied to vertical range input with datalist reference</title>
+<input type="range" orient="vertical" min="-100" max="100" value="0" step="10" name="power" list="powers">
+<datalist id="powers">
+ <option value="0">
+ <option value="-30">
+ <option value="30">
+ <option value="50">
+</datalist>
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-02.html b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-02.html
new file mode 100644
index 0000000000..bd45631d4a
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-02.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<title>max and min attributes applied to vertical range input with datalist</title>
+<link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#range-state-(type=range)">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#the-min-and-max-attributes">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=841942">
+<link rel="author" href="mailto:zach@zrhoffman.net" title="Zach Hoffman">
+<link rel="mismatch" href="range-tick-marks-02-notref.html">
+<input type="range" orient="vertical" min="-40" max="40" value="0" step="10" name="power" list="powers">
+<datalist id="powers">
+ <option value="0">
+ <option value="-30">
+ <option value="30">
+ <option value="50">
+</datalist>
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-03-ref.html b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-03-ref.html
new file mode 100644
index 0000000000..df473920ec
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-03-ref.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<title>no vertical range tick marks for disabled datalist elements reference</title>
+<input type="range" orient="vertical" min="-100" max="100" value="0" step="10" name="power" list="powers">
+<datalist id="powers">
+ <option value="-30">
+ <option value="50">
+</datalist>
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-03.html b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-03.html
new file mode 100644
index 0000000000..83b5c2eb66
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-03.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<title>no vertical range tick marks for disabled datalist elements</title>
+<link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#range-state-(type=range)">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/form-elements.html#htmldatalistelement">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-disabled">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=841942">
+<link rel="author" href="mailto:zach@zrhoffman.net" title="Zach Hoffman">
+<link rel="match" href="range-tick-marks-03-ref.html">
+<input type="range" orient="vertical" min="-100" max="100" value="0" step="10" name="power" list="powers">
+<datalist id="powers">
+ <option value="0" disabled>
+ <option value="-30">
+ <option value="30" disabled>
+ <option value="50">
+</datalist>
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-04-ref.html b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-04-ref.html
new file mode 100644
index 0000000000..c2bf59e52b
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-04-ref.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<title>no range tick marks for vertical range tick marks that are step mismatches reference</title>
+<input type=range step=3 value=1 min=-5 max=5 list=degrees>
+<datalist id=degrees>
+ <option value=-2>
+ <option value=4>
+</datalist>
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-04.html b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-04.html
new file mode 100644
index 0000000000..a47334b411
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/the-input-element/range-tick-marks-04.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<title>no range tick marks for vertical range tick marks that are step mismatches</title>
+<link rel=help href="https://html.spec.whatwg.org/multipage/input.html#range-state-(type=range)">
+<link rel=help href="https://bugzilla.mozilla.org/show_bug.cgi?id=1803303">
+<link rel=author href="mailto:zach@zrhoffman.net" title="Zach Hoffman">
+<link rel=match href=range-tick-marks-04-ref.html>
+<input type=range step=3 value=1 min=-5 max=5 list=degrees>
+<datalist id=degrees>
+ <option value=-4>
+ <option value=-2>
+ <option value=0>
+ <option value=2>
+ <option value=4>
+</datalist>
diff --git a/testing/web-platform/mozilla/tests/html/semantics/forms/time-enter-keypress.html b/testing/web-platform/mozilla/tests/html/semantics/forms/time-enter-keypress.html
new file mode 100644
index 0000000000..2ffeb22cb4
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/html/semantics/forms/time-enter-keypress.html
@@ -0,0 +1,48 @@
+<!doctype html>
+<title>Enter submits on time input</title>
+<meta charset=utf-8>
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://mozilla.org" title="Mozilla">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<form>
+ <input type="time" name="time">
+ <input type=submit>
+</form>
+<form>
+ <input type="date" name="date">
+ <input type=submit>
+</form>
+<form>
+ <input type="datetime-local" name="datetime-local">
+ <input type=submit>
+</form>
+<script>
+async function testEnterOnInput(form) {
+ const submitted = new Promise(resolve => {
+ form.addEventListener("submit", function(e) {
+ e.preventDefault();
+ resolve();
+ }, { once: true });
+ });
+ const input = form.querySelector("input");
+ input.focus();
+
+ const ENTER = "\uE007";
+ await new test_driver.Actions()
+ .keyDown(ENTER)
+ .keyUp(ENTER)
+ .send()
+ await submitted;
+ assert_true(true, "Form was submitted on enter for input " + input.type);
+}
+
+promise_test(async t => {
+ for (let form of document.querySelectorAll("form")) {
+ await testEnterOnInput(form, t);
+ }
+});
+</script>