Diff
Modified: trunk/LayoutTests/ChangeLog (283524 => 283525)
--- trunk/LayoutTests/ChangeLog 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/ChangeLog 2021-10-04 23:44:08 UTC (rev 283525)
@@ -1,3 +1,15 @@
+2021-10-04 Tim Nguyen <[email protected]>
+
+ Re-import html/semantics/forms/ WPT
+ https://bugs.webkit.org/show_bug.cgi?id=231168
+
+ Reviewed by Youenn Fablet.
+
+ https://github.com/web-platform-tests/wpt/commit/dc29fc4ff101c1c216494a88a1f8a31a0f21d0aa
+
+ * TestExpectations:
+ * tests-options.json:
+
2021-10-04 Ayumi Kojima <[email protected]>
Cleaning up expectations for iOS 15.
Modified: trunk/LayoutTests/TestExpectations (283524 => 283525)
--- trunk/LayoutTests/TestExpectations 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/TestExpectations 2021-10-04 23:44:08 UTC (rev 283525)
@@ -562,8 +562,6 @@
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/natural-size-orientation.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-multiple-targets.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-to-different-origin-frame.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-children.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset-2.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/referrer-policies.sub.html [ Skip ]
@@ -795,7 +793,6 @@
imported/w3c/web-platform-tests/html/browsers/windows/targeting-cross-origin-nested-browsing-contexts.html [ Failure Pass ]
imported/w3c/web-platform-tests/html/webappapis/update-rendering/child-document-raf-order.html [ Failure Pass ]
imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-lazy.tentative.html [ Failure Pass ]
-imported/w3c/web-platform-tests/html/semantics/forms/autofocus/update-the-rendering.html [ Failure Pass ]
imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors.sub.html [ Failure Pass ]
imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.any.html [ Failure Pass ]
imported/w3c/web-platform-tests/fetch/content-length/parsing.window.html [ Failure Pass ]
@@ -5215,3 +5212,5 @@
imported/w3c/web-platform-tests/content-security-policy/script-src/ [ DumpJSConsoleLogInStdErr ]
+# import-w3c-tests copies -notref.html to -expected.html, so expected image failure here.
+imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative.html [ ImageOnlyFailure ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-10-04 23:44:08 UTC (rev 283525)
@@ -1,3 +1,91 @@
+2021-10-04 Tim Nguyen <[email protected]>
+
+ Re-import html/semantics/forms/ WPT
+ https://bugs.webkit.org/show_bug.cgi?id=231168
+
+ Reviewed by Youenn Fablet.
+
+ https://github.com/web-platform-tests/wpt/commit/dc29fc4ff101c1c216494a88a1f8a31a0f21d0aa
+
+ * resources/import-expectations.json:
+ * resources/resource-files.json:
+ * web-platform-tests/html/semantics/forms/autofocus/autofocus-on-stable-document-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/autofocus-on-stable-document.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/first-reconnected-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/first-reconnected.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/first-when-later-but-before-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/first-when-later-but-before.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/first-when-later-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/first-when-later.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/first-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/first.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/focusable-area-in-top-document-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/focusable-area-in-top-document.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/no-cross-origin-autofocus-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/no-cross-origin-autofocus.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/no-sandboxed-automatic-features-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/no-sandboxed-automatic-features.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/not-on-first-task-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/not-on-first-task.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/queue-non-focusable-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/queue-non-focusable.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/resources/child-autofocus.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/resources/erase-first.css: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/resources/frame-with-autofocus-element.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/resources/moving-autofocus-to-parent.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/resources/utils.js: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/resources/w3c-import.log: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/skip-another-top-level-browsing-context-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/skip-another-top-level-browsing-context.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/skip-document-with-fragment-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/skip-document-with-fragment.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/skip-non-focusable-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/skip-non-focusable.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/skip-not-fully-active-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/skip-not-fully-active.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/spin-by-blocking-style-sheet-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/spin-by-blocking-style-sheet.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/supported-elements-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/supported-elements.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/update-the-rendering-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/update-the-rendering.html: Removed.
+ * web-platform-tests/html/semantics/forms/autofocus/w3c-import.log: Removed.
+ * web-platform-tests/html/semantics/forms/introduction-1/contains.json: Removed.
+ * web-platform-tests/html/semantics/forms/introduction-1/w3c-import.log: Removed.
+ * web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/textfieldselection/select-event.html: Removed.
+ * web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html: Removed.
+ * web-platform-tests/html/semantics/forms/textfieldselection/w3c-import.log:
+ * web-platform-tests/html/semantics/forms/the-button-element/w3c-import.log:
+ * web-platform-tests/html/semantics/forms/the-button-element/active-onblur-expected.txt: Added.
+ * web-platform-tests/html/semantics/forms/the-button-element/active-onblur.html: Added.
+ * web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-jssubmit-expected.txt: Added.
+ * web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-jssubmit.html: Added.
+ * web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus-expected.txt: Removed.
+ * web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus.html: Removed.
+ * web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log:
+ * web-platform-tests/html/semantics/forms/the-input-element/input-submit-remove-jssubmit-expected.txt: Added.
+ * web-platform-tests/html/semantics/forms/the-input-element/input-submit-remove-jssubmit.html: Added.
+ * web-platform-tests/html/semantics/forms/the-option-element/dynamic-content-change-rendering.html:
+ * web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt:
+ * web-platform-tests/html/semantics/forms/the-select-element/select-validity.html:
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-keyboard.tentative-expected.txt: Added.
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-keyboard.tentative.html: Added.
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-nested.tentative-expected.txt: Added.
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-nested.tentative.html: Added.
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-shadow-root-replacement.tentative-expected.txt: Added.
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-shadow-root-replacement.tentative.html: Added.
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-parts-structure.tentative-expected.txt:
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-parts-structure.tentative.html:
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative-expected.txt:
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative.html:
+ * web-platform-tests/html/semantics/forms/the-selectmenu-element/w3c-import.log:
+ * web-platform-tests/html/semantics/forms/the-textarea-element/w3c-import.log:
+ * web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space-notref.html: Added.
+ * web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative-expected.html: Added.
+ * web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative.html: Added.
+
2021-10-04 Chris Dumez <[email protected]>
Use isolated NSURLSessions for each first party registrable domain
Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2021-10-04 23:44:08 UTC (rev 283525)
@@ -312,6 +312,7 @@
"web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html": "skip",
"web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data": "skip",
"web-platform-tests/html/semantics/embedded-content/the-object-element/object-events.html": "skip",
+ "web-platform-tests/html/semantics/forms/": "import",
"web-platform-tests/html/semantics/forms/textfieldselection/select-event.html": "skip",
"web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html": "skip",
"web-platform-tests/html/semantics/forms/the-textarea-element": "import",
Modified: trunk/LayoutTests/imported/w3c/resources/resource-files.json (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/resources/resource-files.json 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/resources/resource-files.json 2021-10-04 23:44:08 UTC (rev 283525)
@@ -2679,7 +2679,6 @@
"web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr-iframe.html",
"web-platform-tests/html/semantics/forms/constraints/number-input-lang-validationMessage-crash.html",
"web-platform-tests/html/semantics/forms/form-submission-0/form-data-set-usv-form.html",
- "web-platform-tests/html/semantics/forms/resetting-a-form/reset-form-event-realm-support.html",
"web-platform-tests/html/semantics/forms/resetting-a-form/support/reset-form-event-realm.html",
"web-platform-tests/html/semantics/forms/the-button-element/button-activate-frame.html",
"web-platform-tests/html/semantics/forms/the-datalist-element/remove-datalist-crash.html",
@@ -2687,6 +2686,7 @@
"web-platform-tests/html/semantics/forms/the-input-element/hidden-charset-case-sensitive-child.html",
"web-platform-tests/html/semantics/forms/the-label-element/iframe-label-attributes.html",
"web-platform-tests/html/semantics/forms/the-select-element/select-add-option-crash.html",
+ "web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space-notref.html",
"web-platform-tests/html/semantics/forms/the-textarea-element/wrap-enumerated-ascii-case-insensitive-child.html",
"web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering-iframe.sub.html",
"web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-audio-video-crash.html",
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -1,76 +0,0 @@
-
-Harness Error (TIMEOUT), message = null
-
-TIMEOUT textarea: select() Test timed out
-NOTRUN textarea: select() a second time (must not fire select)
-NOTRUN textarea: selectionStart
-NOTRUN textarea: selectionStart a second time (must not fire select)
-NOTRUN textarea: selectionEnd
-NOTRUN textarea: selectionEnd a second time (must not fire select)
-NOTRUN textarea: selectionDirection
-NOTRUN textarea: selectionDirection a second time (must not fire select)
-NOTRUN textarea: setSelectionRange()
-NOTRUN textarea: setSelectionRange() a second time (must not fire select)
-NOTRUN textarea: setRangeText()
-NOTRUN textarea: setRangeText() a second time (must not fire select)
-NOTRUN input type text: select()
-NOTRUN input type text: select() a second time (must not fire select)
-NOTRUN input type text: selectionStart
-NOTRUN input type text: selectionStart a second time (must not fire select)
-NOTRUN input type text: selectionEnd
-NOTRUN input type text: selectionEnd a second time (must not fire select)
-NOTRUN input type text: selectionDirection
-NOTRUN input type text: selectionDirection a second time (must not fire select)
-NOTRUN input type text: setSelectionRange()
-NOTRUN input type text: setSelectionRange() a second time (must not fire select)
-NOTRUN input type text: setRangeText()
-NOTRUN input type text: setRangeText() a second time (must not fire select)
-NOTRUN input type search: select()
-NOTRUN input type search: select() a second time (must not fire select)
-NOTRUN input type search: selectionStart
-NOTRUN input type search: selectionStart a second time (must not fire select)
-NOTRUN input type search: selectionEnd
-NOTRUN input type search: selectionEnd a second time (must not fire select)
-NOTRUN input type search: selectionDirection
-NOTRUN input type search: selectionDirection a second time (must not fire select)
-NOTRUN input type search: setSelectionRange()
-NOTRUN input type search: setSelectionRange() a second time (must not fire select)
-NOTRUN input type search: setRangeText()
-NOTRUN input type search: setRangeText() a second time (must not fire select)
-NOTRUN input type tel: select()
-NOTRUN input type tel: select() a second time (must not fire select)
-NOTRUN input type tel: selectionStart
-NOTRUN input type tel: selectionStart a second time (must not fire select)
-NOTRUN input type tel: selectionEnd
-NOTRUN input type tel: selectionEnd a second time (must not fire select)
-NOTRUN input type tel: selectionDirection
-NOTRUN input type tel: selectionDirection a second time (must not fire select)
-NOTRUN input type tel: setSelectionRange()
-NOTRUN input type tel: setSelectionRange() a second time (must not fire select)
-NOTRUN input type tel: setRangeText()
-NOTRUN input type tel: setRangeText() a second time (must not fire select)
-NOTRUN input type url: select()
-NOTRUN input type url: select() a second time (must not fire select)
-NOTRUN input type url: selectionStart
-NOTRUN input type url: selectionStart a second time (must not fire select)
-NOTRUN input type url: selectionEnd
-NOTRUN input type url: selectionEnd a second time (must not fire select)
-NOTRUN input type url: selectionDirection
-NOTRUN input type url: selectionDirection a second time (must not fire select)
-NOTRUN input type url: setSelectionRange()
-NOTRUN input type url: setSelectionRange() a second time (must not fire select)
-NOTRUN input type url: setRangeText()
-NOTRUN input type url: setRangeText() a second time (must not fire select)
-NOTRUN input type password: select()
-NOTRUN input type password: select() a second time (must not fire select)
-NOTRUN input type password: selectionStart
-NOTRUN input type password: selectionStart a second time (must not fire select)
-NOTRUN input type password: selectionEnd
-NOTRUN input type password: selectionEnd a second time (must not fire select)
-NOTRUN input type password: selectionDirection
-NOTRUN input type password: selectionDirection a second time (must not fire select)
-NOTRUN input type password: setSelectionRange()
-NOTRUN input type password: setSelectionRange() a second time (must not fire select)
-NOTRUN input type password: setRangeText()
-NOTRUN input type password: setRangeText() a second time (must not fire select)
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event.html (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event.html 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -1,146 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<meta name="timeout" content="long">
-<title>text field selection: select()</title>
-<link rel="author" title="Domenic Denicola" href=""
-<link rel=help href=""
-<script src=""
-<script src=""
-<div id="log"></div>
-
-<textarea>foobar</textarea>
-<input type="text" value="foobar">
-<input type="search" value="foobar">
-<input type="tel" value="1234">
-<input type="url" value="https://example.com/">
-<input type="password" value="hunter2">
-
-<script>
-"use strict";
-
-const els = [document.querySelector("textarea"), ...document.querySelectorAll("input")];
-
-const actions = [
- {
- label: "select()",
- action: el => el.select()
- },
- {
- label: "selectionStart",
- action: el => el.selectionStart = 1
- },
- {
- label: "selectionEnd",
- action: el => el.selectionEnd = el.value.length - 1
- },
- {
- label: "selectionDirection",
- action: el => el.selectionDirection = "backward"
- },
- {
- label: "setSelectionRange()",
- action: el => el.setSelectionRange(1, el.value.length - 1) // changes direction implicitly to none/forward
- },
- {
- label: "setRangeText()",
- action: el => el.setRangeText("newmiddle", el.selectionStart, el.selectionEnd, "select")
- },
- {
- label: "selectionStart out of range",
- action: el => el.selectionStart = 1000
- },
- {
- label: "selectionEnd out of range",
- action: el => el.selectionEnd = 1000
- },
- {
- label: "setSelectionRange out of range",
- action: el => el.setSelectionRange(1000, 2000)
- }
-];
-
-function initialize(el) {
- el.value = "foobar";
- el.setSelectionRange(0, 0);
- return new Promise(requestAnimationFrame);
-}
-
-els.forEach((el) => {
- const elLabel = el.localName === "textarea" ? "textarea" : "input type " + el.type;
-
- actions.forEach((action) => {
- // promise_test instead of async_test is important because these need to happen in sequence (to test that events
- // fire if and only if the selection changes).
- promise_test(async t => {
- await initialize(el);
-
- const watcher = new EventWatcher(t, el, "select");
-
- const promise = watcher.wait_for("select").then(e => {
- assert_true(e.isTrusted, "isTrusted must be true");
- assert_true(e.bubbles, "bubbles must be true");
- assert_false(e.cancelable, "cancelable must be false");
- });
-
- action.action(el);
-
- return promise;
- }, `${elLabel}: ${action.label}`);
-
- promise_test(t => {
- el._onselect_ = t.unreached_func("the select event must not fire the second time");
-
- action.action(el);
-
- return new Promise(resolve => {
- t.step_timeout(() => {
- el._onselect_ = null;
- resolve();
- }, 200);
- });
- }, `${elLabel}: ${action.label} a second time (must not fire select)`);
-
- promise_test(async t => {
- const element = el.cloneNode(true);
-
- element._onselect_ = e => {
- element._onselect_ = null;
- };
-
- action.action(element);
-
- // step_wait properly timeouts before the whole test collapses
- await t.step_wait(() => !element.onselect, "event didn't fire", 200, 10);
- }, `${elLabel}: ${action.label} disconnected node`);
-
- // Intentionally still using promise_test, as assert_unreachable does not
- // make the test fail inside a listener while t.unreached_func() does.
- promise_test(async t => {
- const element = el.cloneNode(true);
- let fired = false;
-
- element._onselect_ = () => fired = true;
- action.action(element);
- assert_false(fired, "the select event must not fire synchronously")
-
- await t.step_wait(() => fired, "event didn't fire", 200, 10);
- }, `${elLabel}: ${action.label} event queue`);
-
- promise_test(t => {
- const element = el.cloneNode(true);
- assert_equals(element.selectionEnd, 0);
-
- element._onselect_ = () => {
- element._onselect_ = t.unreached_func("the select event must not fire twice");
- };
-
- action.action(element);
- action.action(element);
-
- return new Promise(resolve => {
- t.step_timeout(resolve, 200);
- });
- }, `${elLabel}: ${action.label} twice in disconnected node (must fire select only once)`);
- });
-});
-</script>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -1,76 +0,0 @@
-
-Harness Error (TIMEOUT), message = null
-
-PASS text setRangeText with only one argument replaces the value between selectionStart and selectionEnd, otherwise replaces the value between 2nd and 3rd arguments
-PASS text selectionMode missing
-PASS text selectionMode 'select'
-PASS text selectionMode 'start'
-PASS text selectionMode 'end'
-PASS text selectionMode 'preserve'
-PASS text setRangeText with 3rd argument greater than 2nd argument throws an IndexSizeError exception
-PASS text setRangeText without argument throws a type error
-TIMEOUT text setRangeText fires a select event Test timed out
-PASS search setRangeText with only one argument replaces the value between selectionStart and selectionEnd, otherwise replaces the value between 2nd and 3rd arguments
-PASS search selectionMode missing
-PASS search selectionMode 'select'
-PASS search selectionMode 'start'
-PASS search selectionMode 'end'
-PASS search selectionMode 'preserve'
-PASS search setRangeText with 3rd argument greater than 2nd argument throws an IndexSizeError exception
-PASS search setRangeText without argument throws a type error
-TIMEOUT search setRangeText fires a select event Test timed out
-PASS tel setRangeText with only one argument replaces the value between selectionStart and selectionEnd, otherwise replaces the value between 2nd and 3rd arguments
-PASS tel selectionMode missing
-PASS tel selectionMode 'select'
-PASS tel selectionMode 'start'
-PASS tel selectionMode 'end'
-PASS tel selectionMode 'preserve'
-PASS tel setRangeText with 3rd argument greater than 2nd argument throws an IndexSizeError exception
-PASS tel setRangeText without argument throws a type error
-TIMEOUT tel setRangeText fires a select event Test timed out
-PASS url setRangeText with only one argument replaces the value between selectionStart and selectionEnd, otherwise replaces the value between 2nd and 3rd arguments
-PASS url selectionMode missing
-PASS url selectionMode 'select'
-PASS url selectionMode 'start'
-PASS url selectionMode 'end'
-PASS url selectionMode 'preserve'
-PASS url setRangeText with 3rd argument greater than 2nd argument throws an IndexSizeError exception
-PASS url setRangeText without argument throws a type error
-TIMEOUT url setRangeText fires a select event Test timed out
-PASS password setRangeText with only one argument replaces the value between selectionStart and selectionEnd, otherwise replaces the value between 2nd and 3rd arguments
-PASS password selectionMode missing
-PASS password selectionMode 'select'
-PASS password selectionMode 'start'
-PASS password selectionMode 'end'
-PASS password selectionMode 'preserve'
-PASS password setRangeText with 3rd argument greater than 2nd argument throws an IndexSizeError exception
-PASS password setRangeText without argument throws a type error
-TIMEOUT password setRangeText fires a select event Test timed out
-FAIL display_none setRangeText with only one argument replaces the value between selectionStart and selectionEnd, otherwise replaces the value between 2nd and 3rd arguments assert_equals: expected "foobar2bar" but got "foobar"
-FAIL display_none selectionMode missing assert_equals: expected "foobar2bar" but got "foobar"
-FAIL display_none selectionMode 'select' assert_equals: expected "foofoo" but got "foobar"
-FAIL display_none selectionMode 'start' assert_equals: expected "foofoo" but got "foobar"
-FAIL display_none selectionMode 'end' assert_equals: expected "foofoobar" but got "foobar"
-FAIL display_none selectionMode 'preserve' assert_equals: expected "foo" but got "foobar"
-PASS display_none setRangeText with 3rd argument greater than 2nd argument throws an IndexSizeError exception
-PASS display_none setRangeText without argument throws a type error
-TIMEOUT display_none setRangeText fires a select event Test timed out
-PASS textarea setRangeText with only one argument replaces the value between selectionStart and selectionEnd, otherwise replaces the value between 2nd and 3rd arguments
-PASS textarea selectionMode missing
-PASS textarea selectionMode 'select'
-PASS textarea selectionMode 'start'
-PASS textarea selectionMode 'end'
-PASS textarea selectionMode 'preserve'
-PASS textarea setRangeText with 3rd argument greater than 2nd argument throws an IndexSizeError exception
-PASS textarea setRangeText without argument throws a type error
-TIMEOUT textarea setRangeText fires a select event Test timed out
-FAIL input_not_in_doc setRangeText with only one argument replaces the value between selectionStart and selectionEnd, otherwise replaces the value between 2nd and 3rd arguments assert_equals: expected "foobar2bar" but got "foobar"
-FAIL input_not_in_doc selectionMode missing assert_equals: expected "foobar2bar" but got "foobar"
-FAIL input_not_in_doc selectionMode 'select' assert_equals: expected "foofoo" but got "foobar"
-FAIL input_not_in_doc selectionMode 'start' assert_equals: expected "foofoo" but got "foobar"
-FAIL input_not_in_doc selectionMode 'end' assert_equals: expected "foofoobar" but got "foobar"
-FAIL input_not_in_doc selectionMode 'preserve' assert_equals: expected "foo" but got "foobar"
-PASS input_not_in_doc setRangeText with 3rd argument greater than 2nd argument throws an IndexSizeError exception
-PASS input_not_in_doc setRangeText without argument throws a type error
-TIMEOUT input_not_in_doc setRangeText fires a select event Test timed out
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -1,155 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>text field selection: setRangeText</title>
-<link rel="author" title="Denis Ah-Kang" href=""
-<link rel=help href=""
-<script src=""
-<script src=""
-<style>
- #display_none {display:none;}
-</style>
-<div id="log"></div>
-<input type=text id=text value="foobar">
-<input type=search id=search value="foobar">
-<input type=tel id=tel value="foobar">
-<input type=url id=url value="foobar">
-<input type=password id=password value="foobar">
-<input id=display_none value="foobar">
-<textarea id=textarea>foobar</textarea>
-<script>
- var input = document.createElement("input");
- input.id = "input_not_in_doc";
- input.value = "foobar";
-
- var elements = [
- document.getElementById("text"),
- document.getElementById("search"),
- document.getElementById("tel"),
- document.getElementById("url"),
- document.getElementById("password"),
- document.getElementById("display_none"),
- document.getElementById("textarea"),
- input,
- ]
-
- function untilEvent(element, eventName) {
- return new Promise((resolve) => {
- element.addEventListener(eventName, resolve, { once: true });
- });
- }
-
- elements.forEach(function(element) {
- test(function() {
- element.value = "foobar";
- element.selectionStart = 0;
- element.selectionEnd = 3;
- assert_equals(element.selectionStart, 0);
- assert_equals(element.selectionEnd, 3);
- element.setRangeText("foobar2");
- assert_equals(element.value, "foobar2bar");
- assert_equals(element.selectionStart, 0);
- assert_equals(element.selectionEnd, 7);
- element.setRangeText("foobar3", 7, 10);
- assert_equals(element.value, "foobar2foobar3");
- }, element.id + " setRangeText with only one argument replaces the value between selectionStart and selectionEnd, otherwise replaces the value between 2nd and 3rd arguments");
-
- test(function(){
- element.value = "foobar";
- element.selectionStart = 0;
- element.selectionEnd = 0;
-
- element.setRangeText("foobar2", 0, 3); // no 4th arg, default "preserve"
- assert_equals(element.value, "foobar2bar");
- assert_equals(element.selectionStart, 0);
- assert_equals(element.selectionEnd, 0);
- }, element.id + " selectionMode missing");
-
- test(function(){
- element.value = "foobar"
- element.setRangeText("foo", 3, 6, "select");
- assert_equals(element.value, "foofoo");
- assert_equals(element.selectionStart, 3);
- assert_equals(element.selectionEnd, 6);
- }, element.id + " selectionMode 'select'");
-
- test(function(){
- element.value = "foobar"
- element.setRangeText("foo", 3, 6, "start");
- assert_equals(element.value, "foofoo");
- assert_equals(element.selectionStart, 3);
- assert_equals(element.selectionEnd, 3);
- }, element.id + " selectionMode 'start'");
-
- test(function(){
- element.value = "foobar"
- element.setRangeText("foobar", 3, 6, "end");
- assert_equals(element.value, "foofoobar");
- assert_equals(element.selectionStart, 9);
- assert_equals(element.selectionEnd, 9);
- }, element.id + " selectionMode 'end'");
-
- test(function(){
- element.value = "foobar"
- element.selectionStart = 0;
- element.selectionEnd = 5;
- assert_equals(element.selectionStart, 0);
- element.setRangeText("", 3, 6, "preserve");
- assert_equals(element.value, "foo");
- assert_equals(element.selectionStart, 0);
- assert_equals(element.selectionEnd, 3);
- }, element.id + " selectionMode 'preserve'");
-
- test(function(){
- assert_throws_dom("INDEX_SIZE_ERR", function() {
- element.setRangeText("barfoo", 2, 1);
- });
- }, element.id + " setRangeText with 3rd argument greater than 2nd argument throws an IndexSizeError exception");
-
- test(function(){
- assert_throws_js(TypeError, function() {
- element.setRangeText();
- });
- }, element.id + " setRangeText without argument throws a type error");
-
- promise_test(async (t) => {
- // At this point there are already "select" events queued up on
- // "element". Give them time to fire; otherwise we can get spurious
- // passes.
- //
- // This is unfortunately racy in that we might _still_ get spurious
- // passes. I'm not sure how best to handle that.
- t.step_timeout(function() {
- var q = false;
- element._onselect_ = t.step_func_done(function(e) {
- assert_true(q, "event should be queued");
- assert_true(e.isTrusted, "event is trusted");
- assert_true(e.bubbles, "event bubbles");
- assert_false(e.cancelable, "event is not cancelable");
- });
- element.setRangeText("foobar2", 0, 6);
- q = true;
- }, 10);
- }, element.id + " setRangeText fires a select event");
-
- promise_test(async () => {
- element.value = "XXXXXXXXXXXXXXXXXXX";
- const { length } = element.value;
- element.setSelectionRange(0, length);
- await untilEvent(element, "select");
- element.setRangeText("foo", 2, 2);
- await untilEvent(element, "select");
- assert_equals(element.selectionStart, 0, ".selectionStart");
- assert_equals(element.selectionEnd, length + 3, ".selectionEnd");
- }, element.id + " setRangeText fires a select event when fully selected");
-
- promise_test(async () => {
- element.value = "XXXXXXXXXXXXXXXXXXX";
- element.select();
- await untilEvent(element, "select");
- element.setRangeText("foo", 2, 2);
- await untilEvent(element, "select");
- assert_equals(element.selectionStart, 0, ".selectionStart");
- assert_equals(element.selectionEnd, element.value.length, ".selectionEnd");
- }, element.id + " setRangeText fires a select event after select()");
- })
-</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/w3c-import.log (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/w3c-import.log 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/w3c-import.log 2021-10-04 23:44:08 UTC (rev 283525)
@@ -16,7 +16,6 @@
List of files:
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/defaultSelection.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/original-id.json
-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-after-content-change.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-textarea.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application.html
@@ -26,5 +25,4 @@
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/setSelectionRange.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textarea-selection-while-parsing.xhtml
-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/active-onblur-expected.txt (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/active-onblur-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/active-onblur-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,4 @@
+button one button two
+
+FAIL Buttons should clear :active when the user tabs away from them while holding spacebar. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: action"
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/active-onblur.html (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/active-onblur.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/active-onblur.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="author" title="Joey Arhar" href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+
+<!-- This behavior is not explicitly specified. -->
+
+<button id=b1>button one</button>
+<button id=b2>button two</button>
+
+<script>
+promise_test(async () => {
+ b1.focus();
+
+ // Hold spacebar down
+ await (new test_driver.Actions()).keyDown('\uE00D').send();
+ assert_equals(document.querySelector(':active'), b1,
+ 'Buttons should be :active while the spacebar is pressed down.');
+
+ // Press tab
+ await (new test_driver.Actions()).keyDown('\uE004').keyUp('\uE004').send();
+ assert_equals(document.querySelector(':active'), null,
+ 'Buttons should not be :active after tab is used to change focus.');
+
+ // Release spacebar
+ await (new test_driver.Actions()).keyUp('\uE00D').send();
+}, 'Buttons should clear :active when the user tabs away from them while holding spacebar.');
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-jssubmit-expected.txt (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-jssubmit-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-jssubmit-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,5 @@
+
+
+
+PASS This test will pass if a form navigation successfully occurs when clicking a <button type=submit> element with a onclick event handler which removes the button and then calls form.submit().
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-jssubmit.html (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-jssubmit.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-jssubmit.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="help" href=""
+<script src=""
+<script src=""
+
+<iframe name="frame" id="frame"></iframe>
+<form id="form" target="frame" action=""
+ <input id="input" name="name" value="foo">
+ <button id="submitbutton" type="submit">Submit</button>
+</form>
+
+<script>
+async_test(t => {
+ window.addEventListener('load', () => {
+ const frame = document.getElementById('frame');
+ frame.addEventListener('load', t.step_func_done(() => {
+ const expected = (new URL("does_not_exist.html?name=bar", location.href)).href;
+ assert_equals(frame.contentWindow.location.href, expected);
+ }));
+
+ const form = document.getElementById('form');
+ const input = document.getElementById('input');
+ const submitButton = document.getElementById('submitbutton');
+ submitButton.addEventListener('click', event => {
+ submitButton.remove();
+ form.submit();
+ input.value = "bar";
+ form.submit();
+ input.value = "baz";
+ });
+
+ submitButton.click();
+ });
+}, 'This test will pass if a form navigation successfully occurs when clicking a <button type=submit> element with a onclick event handler which removes the button and then calls form.submit().');
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/w3c-import.log (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/w3c-import.log 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/w3c-import.log 2021-10-04 23:44:08 UTC (rev 283525)
@@ -14,6 +14,7 @@
None
------------------------------------------------------------------------
List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/active-onblur.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-activate-frame.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-activate-keyup-prevented.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-activate.html
@@ -26,6 +27,7 @@
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-children.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-children-jssubmit.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-children.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-jssubmit.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-type-enumerated-ascii-case-insensitive.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-type.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-button-element/button-validation.html
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus-expected.txt (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus-expected.txt 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -1,5 +0,0 @@
-
-
-PASS Due to autofocus an event handler can run that changes submitter type, so verify that it is processed before the requestSubmit checks.
-PASS Due to autofocus an event handler can run that removes the submitter, so verify that it is processed before the requestSubmit checks.
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus.html (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus.html 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<script src=""
-<script src=""
-
-<body>
-<div id="target"></div>
-<script>
-
-async_test(t => {
- target.innerHTML = '<form><input id="submitter" type="submit"></input></form>';
- let form = document.querySelector('form');
- let submitter = document.querySelector('input');
- let iframe = document.createElement('iframe');
- iframe._onload_ = t.step_func_done(() => {
- assert_throws_js(TypeError, () => {
- form.requestSubmit(submitter);
- });
- });
-
- submitter.autofocus = true;
- submitter._onfocus_ = t.step_func(() => {
- submitter.type = 'button';
- });
- target.appendChild(iframe);
-}, 'Due to autofocus an event handler can run that changes submitter type, so ' +
- 'verify that it is processed before the requestSubmit checks.');
-
-async_test(t => {
- target.innerHTML = '<form><input id="submitter" type="submit"></input></form>';
- let form = document.querySelector('form');
- let submitter = document.querySelector('input');
- let iframe = document.createElement('iframe');
- iframe._onload_ = t.step_func_done(() => {
- assert_throws_dom("NotFoundError", () => {
- form.requestSubmit(submitter);
- });
- });
-
- submitter.autofocus = true;
- submitter._onfocus_ = t.step_func(() => {
- form.removeChild(submitter);
- });
- target.appendChild(iframe);
-}, 'Due to autofocus an event handler can run that removes the submitter, so ' +
- 'verify that it is processed before the requestSubmit checks.');
-</script>
-</body>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-submit-remove-jssubmit-expected.txt (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-submit-remove-jssubmit-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-submit-remove-jssubmit-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,5 @@
+
+
+
+PASS This test will pass if a form navigation successfully occurs when clicking a <input type=submit> element with a onclick event handler which removes the input and then calls form.submit().
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-submit-remove-jssubmit.html (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-submit-remove-jssubmit.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-submit-remove-jssubmit.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="help" href=""
+<script src=""
+<script src=""
+
+<iframe name="frame" id="frame"></iframe>
+<form id="form" target="frame" action=""
+ <input id="input" name="name" value="foo">
+ <input id="submitbutton" type="submit"></input>
+</form>
+
+<script>
+async_test(t => {
+ window.addEventListener('load', () => {
+ const frame = document.getElementById('frame');
+ frame.addEventListener('load', t.step_func_done(() => {
+ const expected = (new URL("does_not_exist.html?name=bar", location.href)).href;
+ assert_equals(frame.contentWindow.location.href, expected);
+ }));
+
+ const form = document.getElementById('form');
+ const input = document.getElementById('input');
+ const submitButton = document.getElementById('submitbutton');
+ submitButton.addEventListener('click', event => {
+ submitButton.remove();
+ form.submit();
+ input.value = "bar";
+ form.submit();
+ input.value = "baz";
+ });
+
+ submitButton.click();
+ });
+}, 'This test will pass if a form navigation successfully occurs when clicking a <input type=submit> element with a onclick event handler which removes the input and then calls form.submit().');
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log 2021-10-04 23:44:08 UTC (rev 283525)
@@ -44,6 +44,7 @@
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-setcustomvalidity.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-submit-remove-jssubmit.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-type-button.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-type-checkbox.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-types.js
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-option-element/dynamic-content-change-rendering.html (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-option-element/dynamic-content-change-rendering.html 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-option-element/dynamic-content-change-rendering.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -4,6 +4,7 @@
<link rel="help" href=""
<link rel="help" href=""
<link rel="match" href=""
+<meta name=fuzzy content="maxDifference=0-3;totalPixels=20">
<body>
<select id="dropdown">
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -4,4 +4,5 @@
PASS Validation on selects with display size set as more than one
PASS Validation on selects with multiple set
PASS Validation on selects with non-empty disabled option
+FAIL Remove and add back the placeholder label option assert_false: If the placeholder label option is selected, required select element shouldn't be valid. expected false got true
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity.html (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity.html 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -104,4 +104,21 @@
assert_true(select.checkValidity(), "When a required select has an option that is selected and disabled, the select should be considered valid.");
}, "Validation on selects with non-empty disabled option");
+test(function() {
+ var select = document.createElement('select');
+ select.required = true;
+ var placeholder = document.createElement('option');
+ select.appendChild(placeholder);
+ var nonPlaceholder = document.createElement('option');
+ nonPlaceholder.textContent = "non-placeholder-option";
+ select.appendChild(nonPlaceholder);
+
+ assert_false(select.checkValidity(), "If the placeholder label option is selected, required select element shouldn't be valid.");
+ placeholder.remove();
+ assert_true(select.checkValidity(), "If the placeholder label option is removed, required select element should become valid.");
+ select.prepend(placeholder);
+ assert_false(select.checkValidity(), "If the placeholder label option is selected, required select element shouldn't be valid.");
+
+}, "Remove and add back the placeholder label option");
+
</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-keyboard.tentative-expected.txt (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-keyboard.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-keyboard.tentative-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,5 @@
+button
+
+FAIL Validate Enter, Up/Down Arrow, and Space keyboard accessibility support for <selecmenu> assert_false: selectmenu should not be initially open expected false got undefined
+PASS Firing a synthetic event at a selectmenu's option doesn't crash
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-keyboard.tentative.html (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-keyboard.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-keyboard.tentative.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,83 @@
+<!doctype html>
+<title>HTMLSelectMenuElement Test: keyboard accessibility</title>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+ <selectmenu id="selectMenu0">
+ <div id="selectMenu0-button0" slot="button" part="button" tabindex="0">button</div>
+ <option>one</option>
+ <option>two</option>
+ <option>three</option>
+ </selectmenu>
+
+ <selectmenu id="selectMenu1">
+ <option id="selectMenu1-child0">one</option>
+ </selectmenu>
+<script>
+// See https://w3c.github.io/webdriver/#keyboard-actions
+const KEY_CODE_MAP = {
+ 'Enter': '\uE007',
+ 'Space': '\uE00D',
+ 'ArrowUp': '\uE013',
+ 'ArrowDown': '\uE015'
+};
+
+function clickOn(element) {
+ const actions = new test_driver.Actions();
+ return actions.pointerMove(0, 0, {origin: element})
+ .pointerDown({button: actions.ButtonType.LEFT})
+ .pointerUp({button: actions.ButtonType.LEFT})
+ .send();
+ }
+
+promise_test(async t => {
+ const selectMenu = document.querySelector("#selectMenu0");
+ const button = document.querySelector("#selectMenu0-button0");
+ assert_false(selectMenu.open, "selectmenu should not be initially open");
+
+ await test_driver.send_keys(button, KEY_CODE_MAP.Enter);
+ assert_true(selectMenu.open, "Enter key should open selectmenu");
+ assert_equals(selectMenu.value, "one");
+
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.ArrowDown);
+ assert_equals(selectMenu.value, "two", "Down arrow should go to next option");
+
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.ArrowDown);
+ assert_equals(selectMenu.value, "three", "Down arrow should go to next option");
+
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.ArrowDown);
+ assert_equals(selectMenu.value, "three", "Down arrow should do nothing if already at the last option");
+
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.ArrowUp);
+ assert_equals(selectMenu.value, "two", "Up arrow should go to the previous option");
+
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.ArrowUp);
+ assert_equals(selectMenu.value, "one", "Up arrow should go to the previous option");
+
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.ArrowUp);
+ assert_equals(selectMenu.value, "one", "Up arrow should do nothing if already at the first option");
+
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.Enter);
+ assert_false(selectMenu.open, "Enter key should close selectmenu");
+
+ await test_driver.send_keys(selectMenu, " ");
+ assert_true(selectMenu.open, "Space key should open selectmenu");
+
+ // This behavior is suspicious (since Space key can open the selectmenu),
+ // but it maches <select>. See https://github.com/openui/open-ui/issues/386
+ await test_driver.send_keys(selectMenu, " ");
+ assert_true(selectMenu.open, "Space key should *not* close selectmenu");
+
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.Enter);
+ assert_false(selectMenu.open, "Enter key should close selectmenu");
+}, "Validate Enter, Up/Down Arrow, and Space keyboard accessibility support for <selecmenu>");
+
+promise_test(async t => {
+ const selectMenuOption = document.getElementById("selectMenu1-child0");
+ const event = document.createEvent("Event");
+ event.initEvent("keydown");
+ selectMenuOption.dispatchEvent(event);
+}, "Firing a synthetic event at a selectmenu's option doesn't crash");
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-nested.tentative-expected.txt (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-nested.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-nested.tentative-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,8 @@
+
+button0
+button1
+
+FAIL A <selectmenu> shouldn't apply controller code to parts nested in a <selectmenu> child assert_equals: Options nested in another <selectmenu> should not get controller code from outer <selectmenu> expected (string) "three" but got (undefined) undefined
+FAIL A <selectmenu> shouldn't apply controller code to parts nested in a <select> child assert_equals: expected (string) "three" but got (undefined) undefined
+FAIL A nested button part in a nested <selectmenu> shouldn't get controller code even if it comes first in document order assert_false: expected false got undefined
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-nested.tentative.html (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-nested.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-nested.tentative.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html lang="en">
+<title>HTMLSelectMenuElement Test: nested selects</title>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+
+<selectmenu id="selectMenu0">
+ <popup slot="listbox" part="listbox">
+ <selectmenu id="nested0">
+ <option id="child1">one</option>
+ <option id="child2">two</option>
+ </selectmenu>
+ <option id="child3">three</option>
+ </popup>
+</selectmenu>
+
+<selectmenu id="selectMenu1">
+ <popup slot="listbox" part="listbox">
+ <select>
+ <option>one</option>
+ <option>two</option>
+ </select>
+ <option>three</option>
+ </popup>
+</selectmenu>
+
+<selectmenu id="selectMenu2">
+ <div slot="button">
+ <selectmenu id="nested2">
+ <div slot="button" part="button" id="selectMenu2-button0">button0</div>
+ <option id="nested2-option1">one</option>
+ </selectmenu>
+ <div part="button" id="selectMenu2-button1">button1</div>
+ </div>
+ <option>two</option>
+</selectmenu>
+
+<script>
+ function clickOn(element) {
+ const actions = new test_driver.Actions();
+ return actions.pointerMove(0, 0, {origin: element})
+ .pointerDown({button: actions.ButtonType.LEFT})
+ .pointerUp({button: actions.ButtonType.LEFT})
+ .send();
+ }
+
+ promise_test(async () => {
+ const selectMenu0 = document.getElementById("selectMenu0");
+ const nested0 = document.getElementById("nested0");
+ const child2 = document.getElementById("child2");
+ assert_equals(selectMenu0.value, "three", "Options nested in another <selectmenu> should not get controller code from outer <selectmenu>");
+ await clickOn(selectMenu0);
+ assert_true(selectMenu0.open);
+ assert_false(nested0.open);
+
+ await clickOn(nested0);
+ assert_true(nested0.open);
+
+ await clickOn(child2);
+ assert_false(nested0.open);
+ assert_equals(nested0.value, "two");
+ assert_true(selectMenu0.open, "click on option in inner <selectmenu> should not close outer <selectmenu>");
+ assert_equals(selectMenu0.value, "three", "click on option in inner <selectmenu> should not change value of outer <selectmenu>");
+ }, "A <selectmenu> shouldn't apply controller code to parts nested in a <selectmenu> child");
+
+ promise_test(async () => {
+ const selectMenu1 = document.getElementById("selectMenu1");
+ assert_equals(selectMenu0.value, "three");
+ }, "A <selectmenu> shouldn't apply controller code to parts nested in a <select> child");
+
+ promise_test(async () => {
+ const selectMenu2 = document.getElementById("selectMenu2");
+ const nested2 = document.getElementById("nested2");
+ const button0 = document.getElementById("selectMenu2-button0");
+ const button1 = document.getElementById("selectMenu2-button1");
+ const nested2Option1 = document.getElementById("nested2-option1");
+ assert_false(selectMenu2.open);
+ assert_false(nested2.open);
+
+ await clickOn(button0);
+ assert_false(selectMenu2.open, "Clicking the button of a nested <selectmenu> should not open the outer <selectmenu>");
+ assert_true(nested2.open, "Clicking the button of a nested <selectmenu> should open the outer <selectmenu>");
+
+ await clickOn(nested2Option1);
+ assert_false(nested2.open);
+
+ await clickOn(button1);
+ assert_true(selectMenu2.open);
+ assert_false(nested2.open);
+ }, "A nested button part in a nested <selectmenu> shouldn't get controller code even if it comes first in document order");
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-parts-structure.tentative-expected.txt (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-parts-structure.tentative-expected.txt 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-parts-structure.tentative-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -3,8 +3,19 @@
Custom button
Custom button
This is some text. More text.
+button0
+button0
+button0
+Test 10
+Test
FAIL To receive option part controller code, an element labeled as an option must be a descendant of the listbox part in a flat tree traversal assert_equals: expected (string) "one" but got (undefined) undefined
FAIL To receive button part controller code, an element labeled as a button must not be a descendant of the listbox part in a flat tree traversal assert_false: expected false got undefined
FAIL To receive listbox part controller code, an element labeled as a listbox must not be a descendant of the button part in a flat tree traversal assert_false: expected false got undefined
+FAIL Button controller code should be applied in flat tree traversal order regardless of dynamic insertion order assert_false: expected false got undefined
+FAIL Listbox controller code should be applied in flat tree traversal order regardless of dynamic insertion order assert_false: expected false got undefined
+FAIL selected-value controller code should be applied in flat tree traversal order regardless of dynamic insertion order assert_false: expected false got undefined
+FAIL Ensure that option controller code is updated when listbox changes assert_equals: Initial value should be the first option expected (string) "one" but got (undefined) undefined
+FAIL Ensure that controller code is applied after updating the slot attribute assert_false: Controller code not applied due to part attribute missing expected false got undefined
+FAIL Ensure that controller code is applied when slot and part attributes are different assert_false: Controller code not applied due to part attribute not being button expected false got undefined
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-parts-structure.tentative.html (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-parts-structure.tentative.html 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-parts-structure.tentative.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -44,6 +44,72 @@
</div>
</selectmenu>
+<selectmenu id="selectMenu3">
+ <div slot="button" id="selectMenu3-button-slot">
+ <div part="button" id="selectMenu3-button0">button0</div>
+ </div>
+ <option>one</option>
+</selectmenu>
+
+<selectmenu id="selectMenu4">
+ <div slot="button" part="button" id="selectMenu4-button0">button0</div>
+ <div slot="listbox" id="selectMenu4-listbox-slot">
+ <popup part="listbox" id="selectMenu4-listbox0">
+ <option>one</option>
+ <option id="selectMenu4-option2">two</option>
+ </popup>
+ </div>
+</selectmenu>
+
+<selectmenu id="selectMenu5">
+ <div slot="button" id="selectMenu5-button-slot">
+ <div part="button" id="selectMenu5-button0">button0</div>
+ <div part="selected-value" id="selectMenu5-selectedValue0"></div>
+ </div>
+ <option>one</option>
+ <option id="selectMenu5-option0">two</option>
+</selectmenu>
+
+<!-- No associated JS test -- just don't crash when parsing! -->
+<selectmenu id="selectMenu6">
+ <div slot="button"></div>
+ <popup slot="listbox" part="listbox"></popup>
+</selectmenu>
+
+<!-- No associated JS test -- just don't crash when parsing! -->
+<selectmenu id="selectMenu7">
+ <div slot="listbox"></div>
+ <div slot="button" part="button"></div>
+</selectmenu>
+
+<!-- No associated JS test -- just don't crash when parsing! -->
+<selectmenu id="selectMenu8">
+ <div slot="listbox"></div>
+ <option>one</option>
+</selectmenu>
+
+<selectmenu id="selectMenu9">
+ <div slot="listbox" id="selectMenu9-listbox-slot">
+ <popup part="listbox" id="selectMenu9-originalListbox">
+ <option>one</option>
+ <option id="selectMenu9-option2">two</option>
+ </popup>
+ </div>
+</selectmenu>
+
+<selectmenu id="selectMenu10">
+ <div slot="button" id="selectMenu10-div">Test 10</div>
+ <option>one</option>
+ <option id="selectMenu10-option2">two</option>
+</selectmenu>
+
+<selectmenu id="selectMenu11">
+ <popup slot="listbox" part="listbox">
+ <option>one</option>
+ </popup>
+ <div slot="button" part="listbox" id="selectMenu11-button">Test</div>
+</selectmenu>
+
<script>
function clickOn(element) {
const actions = new test_driver.Actions();
@@ -109,4 +175,136 @@
await clickOn(selectMenu2Child4);
assert_equals(selectMenu2.value, "four", "Clicking an <option> that is a descendant of a valid listbox part should update the value");
}, "To receive listbox part controller code, an element labeled as a listbox must not be a descendant of the button part in a flat tree traversal");
+
+ promise_test(async () => {
+ const selectMenu3 = document.getElementById("selectMenu3");
+ const selectMenu3ButtonSlot = document.getElementById("selectMenu3-button-slot");
+ const selectMenu3Button0 = document.getElementById("selectMenu3-button0");
+
+ assert_false(selectMenu3.open);
+
+ let button1 = document.createElement("div");
+ button1.innerText = "button1";
+ button1.setAttribute("part", "button");
+ selectMenu3ButtonSlot.appendChild(button1);
+
+ await clickOn(button1);
+ assert_false(selectMenu3.open, "A button part should only get controller code if it's first in document order, even if added dynamically");
+
+ await clickOn(selectMenu3Button0);
+ assert_true(selectMenu3.open, "A button part should get controller code if it's first in document order");
+ }, "Button controller code should be applied in flat tree traversal order regardless of dynamic insertion order");
+
+ promise_test(async () => {
+ const selectMenu4 = document.getElementById("selectMenu4");
+ const selectMenu4Button0 = document.getElementById("selectMenu4-button0");
+ const selectMenu4ListboxSlot = document.getElementById("selectMenu4-listbox-slot");
+ const selectMenu4Option2 = document.getElementById("selectMenu4-option2");
+
+ assert_false(selectMenu4.open);
+
+ let listbox2 = document.createElement("div");
+ listbox2.innerHTML = `
+ <option>three</option>
+ <option id="selectMenu4-option4">four</option>
+ `;
+ listbox2.setAttribute("part", "listbox");
+ selectMenu4ListboxSlot.appendChild(listbox2);
+
+ await clickOn(selectMenu4Button0);
+ assert_true(selectMenu4.open);
+
+ const selectMenu4Option4 = document.getElementById("selectMenu4-option4");
+ await clickOn(selectMenu4Option4);
+ assert_equals(selectMenu3.value, "one", "An option in a listbox should not get controller code if its listbox isn't first in document order, even if added dynamically");
+
+ await clickOn(selectMenu4Button0);
+ assert_true(selectMenu4.open);
+
+ await clickOn(selectMenu4Option2);
+ assert_equals(selectMenu4.value, "two", "An option in a listbox should get controller code if its listbox is first in document order, even if another listbox was added dynamically");
+}, "Listbox controller code should be applied in flat tree traversal order regardless of dynamic insertion order");
+
+promise_test(async () => {
+ const selectMenu5 = document.getElementById("selectMenu5");
+ const selectMenu5ButtonSlot = document.getElementById("selectMenu5-button-slot");
+ const selectMenu5Button0 = document.getElementById("selectMenu5-button0");
+ const selectMenu5SelectedValue0 = document.getElementById("selectMenu5-selectedValue0");
+
+ assert_false(selectMenu3.open);
+ assert_equals(selectMenu5SelectedValue0.innerText, "one");
+
+ let selectedValue1 = document.createElement("div");
+ selectMenu5ButtonSlot.appendChild(selectedValue1);
+
+ await clickOn(selectMenu5Button0);
+ assert_true(selectMenu5.open);
+
+ await clickOn(document.getElementById("selectMenu5-option0"));
+ assert_false(selectMenu5.open);
+ assert_equals(selectMenu5SelectedValue0.innerText, "two", "first selected-value part in flat tree order should get controller code");
+ assert_equals(selectedValue1.innerText, "", "Dynamically inserted selected-value part shouldn't get controller code if it's not first in flat tree order");
+ }, "selected-value controller code should be applied in flat tree traversal order regardless of dynamic insertion order");
+
+ promise_test(async () => {
+ const selectMenu = document.getElementById("selectMenu9");
+ const originalListbox = document.getElementById("selectMenu9-originalListbox");
+ const option2 = document.getElementById("selectMenu9-option2");
+ assert_equals(selectMenu.value, "one", "Initial value should be the first option");
+
+ let newListbox = document.createElement("popup");
+ newListbox.setAttribute("part", "listbox");
+ let newOption = document.createElement("option");
+ newOption.innerText = "three";
+ newListbox.appendChild(newOption);
+ let newOption2 = document.createElement("option");
+ newOption2.innerText = "four";
+ newListbox.appendChild(newOption2);
+ originalListbox.parentElement.insertBefore(newListbox, originalListbox);
+
+ await clickOn(selectMenu);
+ assert_true(selectMenu.open, "Menu should open when clicked");
+
+ option2.click(); // clickOn doesn't work because the old options are not displayed
+ assert_equals(selectMenu.value, "three", "Elements in second popup should no longer be option parts");
+ assert_true(selectMenu.open, "Clicking non-part options shouldn't close the popup");
+
+ await clickOn(newOption2);
+ assert_false(selectMenu.open);
+ assert_equals(selectMenu.value, "four", "New options should get controller code after listbox switch");
+ }, "Ensure that option controller code is updated when listbox changes");
+
+ promise_test(async () => {
+ const selectMenu = document.getElementById("selectMenu10");
+ const selectMenu10Div = document.getElementById("selectMenu10-div");
+
+ await clickOn(selectMenu10Div);
+ assert_false(selectMenu.open, "Controller code not applied due to part attribute missing");
+ selectMenu10Div.part = "button";
+ await clickOn(selectMenu10Div);
+ assert_true(selectMenu.open);
+
+ const option2 = document.getElementById("selectMenu10-option2");
+ await clickOn(option2);
+ assert_equals(selectMenu.value, "two");
+
+ selectMenu10Div.slot = "";
+ await clickOn(selectMenu);
+ assert_true(selectMenu.open, "Default button part should be used");
+ selectMenu10Div.part = "option";
+ await clickOn(selectMenu10Div);
+ assert_equals(selectMenu.value, "Test 10");
+ }, "Ensure that controller code is applied after updating the slot attribute");
+
+ promise_test(async () => {
+ const selectMenu = document.getElementById("selectMenu11");
+ const selectMenu11Button= document.getElementById("selectMenu11-button");
+
+ await clickOn(selectMenu11Button);
+ assert_false(selectMenu.open, "Controller code not applied due to part attribute not being button");
+ selectMenu11Button.remove();
+
+ await clickOn(selectMenu);
+ assert_true(selectMenu.open, "Default button part should be used");
+ }, "Ensure that controller code is applied when slot and part attributes are different");
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative-expected.txt (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative-expected.txt 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -5,4 +5,5 @@
FAIL Opening the popup and clicking an option should change the selectmenu's value assert_equals: expected (string) "one" but got (undefined) undefined
FAIL With custom button and popup: opening the popup and clicking an option should change the selectmenu's value assert_equals: expected (string) "one" but got (undefined) undefined
FAIL Clicking a popup with no listbox part does nothing assert_equals: expected (string) "" but got (undefined) undefined
+FAIL Clicking a popup with a listbox that was removed does nothing assert_equals: expected (string) "" but got (undefined) undefined
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative.html (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative.html 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -29,6 +29,14 @@
<!-- Swap out the listbox part without providing a replacement -->
<div slot="listbox"></div>
</selectmenu>
+
+<selectmenu id="selectMenu3">
+ <div slot="listbox">
+ <popup part="listbox" id="selectMenu3-listbox">
+ <option>one</option>
+ </popup>
+ </div>
+</selectmenu>
<script>
function clickOn(element) {
@@ -75,7 +83,7 @@
assert_equals(selectMenu1.open, true);
await clickOn(selectMenu1Child3);
assert_equals(selectMenu1.value, "three", "Clicking a <div part='option'> should change the value");
- assert_equals(selectMenu1.open, false);
+ assert_equals(selectMenu1.open, false);
}, "With custom button and popup: opening the popup and clicking an option should change the selectmenu's value");
promise_test(async () => {
@@ -83,6 +91,15 @@
await clickOn(selectMenu2);
assert_equals(selectMenu2.value, "");
assert_equals(selectMenu2.open, false);
+ }, "Clicking a popup with no listbox part does nothing");
- }, "Clicking a popup with no listbox part does nothing");
+ promise_test(async () => {
+ const selectMenu3 = document.getElementById("selectMenu3");
+ const selectMenu3Listbox = document.getElementById("selectMenu3-listbox");
+ selectMenu3Listbox.remove();
+
+ await clickOn(selectMenu3);
+ assert_equals(selectMenu3.value, "");
+ assert_equals(selectMenu3.open, false);
+ }, "Clicking a popup with a listbox that was removed does nothing");
</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-shadow-root-replacement.tentative-expected.txt (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-shadow-root-replacement.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-shadow-root-replacement.tentative-expected.txt 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,5 @@
+
+FAIL Test that the UA provided shadow root can be replaced promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
+FAIL Test that the UA provided shadow root can be replaced using declarative shadow DOM assert_equals: expected (boolean) false but got (undefined) undefined
+FAIL Test that only the UA provided shadow root can be replaced The operation is not supported.
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-shadow-root-replacement.tentative.html (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-shadow-root-replacement.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-shadow-root-replacement.tentative.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<title>HTMLSelectMenuElement Test: shadow root replacement</title>
+<link rel="author" title="Ionel Popescu" href=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+
+<selectmenu id="selectmenu"></selectmenu>
+
+<selectmenu id="selectmenu1">
+ <template shadowroot=open>
+ <button part="button">Custom button</button>
+ <popup part="listbox">
+ <slot></slot>
+ </popup>
+ </template>
+ <option>one</option>
+ <option id="selectmenu1-child2">two</option>
+</selectmenu>
+
+<script>
+ // See https://w3c.github.io/webdriver/#keyboard-actions
+ const KEY_CODE_MAP = {
+ 'Enter': '\uE007',
+ 'Space': '\uE00D',
+ 'ArrowUp': '\uE013',
+ 'ArrowDown': '\uE015'
+ };
+
+ function clickOn(element) {
+ const actions = new test_driver.Actions();
+ return actions.pointerMove(0, 0, {origin: element})
+ .pointerDown({button: actions.ButtonType.LEFT})
+ .pointerUp({button: actions.ButtonType.LEFT})
+ .send();
+ }
+
+ promise_test(async () => {
+ const selectMenu = document.getElementById("selectmenu");
+ assert_equals(selectMenu.shadowRoot, null, "The UA provided shadow root should not be exposed to the web");
+ let selectMenuShadow = selectMenu.attachShadow({mode: 'open', delegatesFocus: true});
+ assert_equals(selectMenuShadow.host, selectMenu);
+ assert_equals(selectMenu.shadowRoot, selectMenuShadow);
+ assert_equals(selectMenuShadow.mode, "open");
+ assert_equals(selectMenuShadow.delegatesFocus, true);
+
+ selectMenuShadow.innerHTML = `
+ <style>
+ :focus {
+ outline: 2px solid blue;
+ }
+ #value::before {
+ content: "Value selected: "
+ }
+
+ </style>
+ <button part="button">Open select!</button>
+ <div id="value" part="selected-value"></div>
+ <popup part="listbox">
+ <input type="text" placeholder="Filter options">
+ <option>Thing 1</option>
+ <option>Thing 2</option>
+ <div part="option" id="option3">Thing 3</div>
+ </popup>`;
+ assert_equals(selectMenu.shadowRoot.querySelectorAll("option").length, 2);
+ assert_equals(selectMenu.open, false);
+ await clickOn(selectMenu);
+ assert_equals(selectMenu.open, true, "Ensure that controller code has been provided");
+ assert_equals(selectMenu.value, "Thing 1", "value should start with the text of the first option part");
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.ArrowDown);
+ assert_equals(selectMenu.value, "Thing 2", "Down arrow should go to next option");
+ }, "Test that the UA provided shadow root can be replaced");
+
+ promise_test(async () => {
+ const selectMenu1 = document.getElementById("selectmenu1");
+ assert_equals(selectMenu1.open, false);
+ await clickOn(selectMenu1);
+ assert_equals(selectMenu1.open, true, "Ensure that controller code has been provided");
+ assert_equals(selectMenu1.value, "one", "value should start with the text of the first option part");
+ const selectMenu1Child2 = document.getElementById("selectmenu1-child2");
+ await clickOn(selectMenu1Child2);
+ assert_equals(selectMenu1.value, "two", "Clicking an <option> should change the value");
+ assert_equals(selectMenu1.open, false);
+ }, "Test that the UA provided shadow root can be replaced using declarative shadow DOM");
+
+ test(() => {
+ let customSelectMenu = document.createElement('selectmenu');
+ let customSelectMenuShadow = customSelectMenu.attachShadow({mode : 'closed'});
+ assert_equals(customSelectMenu.shadowRoot, null);
+ assert_equals(customSelectMenuShadow.mode, "closed");
+ assert_throws_dom('NotSupportedError', () => {
+ customSelectMenu.attachShadow({mode : 'closed'});
+ });
+ }, "Test that only the UA provided shadow root can be replaced");
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/w3c-import.log (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/w3c-import.log 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/w3c-import.log 2021-10-04 23:44:08 UTC (rev 283525)
@@ -14,6 +14,8 @@
None
------------------------------------------------------------------------
List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-keyboard.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-nested.tentative.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-option-arbitrary-content-displayed.tentative-expected.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-option-arbitrary-content-displayed.tentative.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-option-arbitrary-content-not-displayed.tentative-expected.html
@@ -21,4 +23,5 @@
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-parts-structure.tentative.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup-position.tentative.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-shadow-root-replacement.tentative.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-value.tentative.html
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space-notref.html (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space-notref.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space-notref.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,8 @@
+<!doctype html>
+<title>CSS Test Reference</title>
+<style>
+ textarea {
+ max-width: 100px;
+ }
+</style>
+<textarea placeholder="This is a really long string that needs to be truncated"></textarea>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative-expected.html (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative-expected.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative-expected.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,8 @@
+<!doctype html>
+<title>CSS Test Reference</title>
+<style>
+ textarea {
+ max-width: 100px;
+ }
+</style>
+<textarea placeholder="This is a really long string that needs to be truncated"></textarea>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative.html (0 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative.html 2021-10-04 23:44:08 UTC (rev 283525)
@@ -0,0 +1,15 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Textarea placeholder honors textarea's text-overflow</title>
+<link rel=author href="" title="Emilio Cobos Álvarez">
+<link rel=author href="" title="Mozilla">
+<link rel=mismatch href=""
+<link rel=help href=""
+<style>
+ textarea {
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ max-width: 100px;
+ }
+</style>
+<textarea placeholder="This is a really long string that needs to be truncated"></textarea>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/w3c-import.log (283524 => 283525)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/w3c-import.log 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/w3c-import.log 2021-10-04 23:44:08 UTC (rev 283525)
@@ -21,6 +21,9 @@
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/multiline-placeholder-crlf.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/multiline-placeholder-expected.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/multiline-placeholder.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space-notref.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/placeholder-white-space.tentative.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/textarea-maxlength.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/textarea-minlength.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/textarea-newline-bidi-expected.html
Modified: trunk/LayoutTests/tests-options.json (283524 => 283525)
--- trunk/LayoutTests/tests-options.json 2021-10-04 23:37:24 UTC (rev 283524)
+++ trunk/LayoutTests/tests-options.json 2021-10-04 23:44:08 UTC (rev 283525)
@@ -3086,9 +3086,6 @@
"imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/submit-entity-body.html": [
"slow"
],
- "imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event.html": [
- "slow"
- ],
"imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection.html": [
"slow"
],