diff --git a/html/semantics/forms/the-select-element/customizable-select-multiple-popup/selectedcontent-multiple.tentative.html b/html/semantics/forms/the-select-element/customizable-select-multiple-popup/selectedcontent-multiple.tentative.html index 7ffa75fef581ec..1c7acbff185626 100644 --- a/html/semantics/forms/the-select-element/customizable-select-multiple-popup/selectedcontent-multiple.tentative.html +++ b/html/semantics/forms/the-select-element/customizable-select-multiple-popup/selectedcontent-multiple.tentative.html @@ -60,7 +60,7 @@ .send(); } -test(() => { +promise_test(async () => { const select = document.getElementById('s1'); const optionOne = select.querySelector('option.one'); const optionTwo = select.querySelector('option.two'); @@ -86,6 +86,7 @@ 'The selectedcontent should update after appending a selected option.'); optionOne.remove(); + await new Promise(queueMicrotask); assert_equals(selectedcontent.innerHTML, expectedHtml([optionThree, optionFour]), 'The selectedcontent should update after removing a selected option.'); }, ' should support + + + + + + + + + + + + + + + + + + diff --git a/html/semantics/forms/the-select-element/customizable-select/selectedcontent-mutations.html b/html/semantics/forms/the-select-element/customizable-select/selectedcontent-mutations.html index ff1b6a1b2b2f33..ffa3569f9ba7af 100644 --- a/html/semantics/forms/the-select-element/customizable-select/selectedcontent-mutations.html +++ b/html/semantics/forms/the-select-element/customizable-select/selectedcontent-mutations.html @@ -459,10 +459,10 @@ "Type: childList | Target: select | Added: [div] | After: #text: \"\"", "Type: childList | Target: select | Added: [#text: \"\"] | After: div", "Type: childList | Target: div#test7 | Added: [#text: \"\"] | After: select", - "Type: childList | Target: selectedcontent | Added: [#text: \"two\"] | Removed: [#text: \"one\"]", "Type: childList | Target: select | Added: [option] | After: #text: \"\"", - "Type: childList | Target: selectedcontent | Added: [#text: \"three\"] | Removed: [#text: \"two\"]", + "Type: childList | Target: selectedcontent | Added: [#text: \"two\"] | Removed: [#text: \"one\"]", "Type: childList | Target: select | Added: [option] | After: option", + "Type: childList | Target: selectedcontent | Added: [#text: \"three\"] | Removed: [#text: \"two\"]", "Type: childList | Target: selectedcontent | Added: [#text: \"one\"] | Removed: [#text: \"three\"]" ] }, @@ -496,6 +496,7 @@ "Type: childList | Target: div#test8 | Added: [#text: \"\"] | After: select", "Type: childList | Target: div#test8 | Removed: [select] | After: #text: \"\" | Before: #text: \"\"", "Type: childList | Target: div.container | Added: [select]", + "Type: childList | Target: selectedcontent | Added: [#text: \"one\"] | Removed: [#text: \"one\"]", "Type: childList | Target: selectedcontent | Added: [#text: \"one\"] | Removed: [#text: \"one\"]" ] } diff --git a/html/semantics/forms/the-select-element/customizable-select/selectedcontent.html b/html/semantics/forms/the-select-element/customizable-select/selectedcontent.html index 1bdcd4b6c6b1af..cb84109cc95295 100644 --- a/html/semantics/forms/the-select-element/customizable-select/selectedcontent.html +++ b/html/semantics/forms/the-select-element/customizable-select/selectedcontent.html @@ -87,9 +87,11 @@ 'Re-inserting the should make it update its contents.'); optionTwo.remove(); + await new Promise(queueMicrotask); assert_equals(selectedcontent.innerHTML, optionOne.innerHTML, 'The innerHTML of should be updated in response to selected