From 2866eb188f4d2eb4473fec6b48b5d135d3b0aeef Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Tue, 28 Jun 2022 11:44:23 +0000 Subject: [PATCH] Bug 1774876 [wpt PR 34487] - Rename the `popup` IDL attribute to `popUp`, per resolution, a=testonly Automatic update from web-platform-tests Rename the `popup` IDL attribute to `popUp`, per resolution See [1] for details, but `popup` as an IDL property is not web compatible. The community has decided to try `popUp` to see if perhaps that will be more compatible. [1] https://github.com/openui/open-ui/issues/546#issuecomment-1158190204 Bug: 1307772 Fixed: 1332480 Change-Id: I0b42c49a9c7b7fa7a6bf10c61443a8b52fb977bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3703470 Reviewed-by: David Baron Commit-Queue: Mason Freed Auto-Submit: Mason Freed Cr-Commit-Position: refs/heads/main@{#1017374} -- wpt-commits: 350691e98b712351b5da4fc511a0f17a9cbec52e wpt-pr: 34487 --- ...popup-animated-hide-cleanup.tentative.html | 38 +-- ...opup-animation-corner-cases.tentative.html | 84 +++--- .../popup-attribute-basic.tentative.html | 274 +++++++++--------- .../popups/popup-focus.tentative.html | 198 ++++++------- .../popup-invoking-attribute.tentative.html | 78 ++--- ...opup-top-layer-interactions.tentative.html | 14 +- 6 files changed, 343 insertions(+), 343 deletions(-) diff --git a/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-cleanup.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-cleanup.tentative.html index 762458ea669dd..99fc2b895761d 100644 --- a/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-cleanup.tentative.html +++ b/testing/web-platform/tests/html/semantics/popups/popup-animated-hide-cleanup.tentative.html @@ -45,51 +45,51 @@ function rAF() { return new Promise(resolve => requestAnimationFrame(resolve)); } -function addPopup(classname) { - const popup = document.createElement('div'); - popup.popup = 'auto'; - popup.classList = classname; - popup.textContent = 'This is a popup'; - document.body.appendChild(popup); - return popup; +function addPopUp(classname) { + const popUp = document.createElement('div'); + popUp.popUp = 'auto'; + popUp.classList = classname; + popUp.textContent = 'This is a pop-up'; + document.body.appendChild(popUp); + return popUp; } promise_test(async () => { - let popup = addPopup("animation"); + let popUp = addPopUp("animation"); let dialog = document.querySelector('dialog'); - popup.showPopup(); // No animations here + popUp.showPopup(); // No animations here await rAF(); - popup.hidePopup(); // Start animations + popUp.hidePopup(); // Start animations await rAF(); - popup.remove(); + popUp.remove(); garbageCollect(); await rAF(); // This test passes if it does not crash. },'Ensure no crashes if running animations are immediately cancelled (document removal)'); promise_test(async (t) => { - let popup = addPopup("animation"); + let popUp = addPopUp("animation"); let dialog = document.querySelector('dialog'); - popup.showPopup(); // No animations here + popUp.showPopup(); // No animations here await rAF(); - popup.hidePopup(); // Start animations + popUp.hidePopup(); // Start animations await rAF(); - dialog.showModal(); // Immediately hide popup + dialog.showModal(); // Immediately hide pop-up t.add_cleanup(() => dialog.close()); await rAF(); - popup.remove(); + popUp.remove(); garbageCollect(); await rAF(); // This test passes if it does not crash. },'Ensure no crashes if running animations are immediately cancelled (dialog showModal)'); promise_test(async (t) => { - let popup = addPopup("transition"); + let popUp = addPopUp("transition"); let dialog = document.querySelector('dialog'); let button = document.createElement('button'); - t.add_cleanup(() => {popup.remove();button.remove();}); + t.add_cleanup(() => {popUp.remove();button.remove();}); document.body.appendChild(button); button.addEventListener('click',() => dialog.show()); - popup.showPopup(); // No animations here + popUp.showPopup(); // No animations here await rAF(); await clickOn(button); await rAF(); diff --git a/testing/web-platform/tests/html/semantics/popups/popup-animation-corner-cases.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-animation-corner-cases.tentative.html index 2edcca5b51adc..9681287026812 100644 --- a/testing/web-platform/tests/html/semantics/popups/popup-animation-corner-cases.tentative.html +++ b/testing/web-platform/tests/html/semantics/popups/popup-animation-corner-cases.tentative.html @@ -29,62 +29,62 @@ diff --git a/testing/web-platform/tests/html/semantics/popups/popup-attribute-basic.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-attribute-basic.tentative.html index 22742a3a6edcd..5e26a725761f0 100644 --- a/testing/web-platform/tests/html/semantics/popups/popup-attribute-basic.tentative.html +++ b/testing/web-platform/tests/html/semantics/popups/popup-attribute-basic.tentative.html @@ -7,164 +7,164 @@
-
Popup
-
Popup
-
Popup
-
Popup
-
Popup
+
Pop up
+
Pop up
+
Pop up
+
Pop up
+
Pop up
-
Non-popup
-
Non-popup
-
Non-popup
+
Not a pop-up
+
Not a pop-up
+
Not a pop-up
@@ -11,80 +11,80 @@ -
-

This is a popup

+
+

This is a pop-up

-
-

This is a popup

+
+

This is a pop-up

-
+
-
-

This is a popup

+
+

This is a pop-up

-

This is a popup

+

This is a pop-up

-

This is a popup with autofocus on a tabindex=0 element

+

This is a pop-up with autofocus on a tabindex=0 element

-

This is a popup

+

This is a pop-up

-
-

This is a popup

+
+

This is a pop-up

-
-

This is a popup

+
+

This is a pop-up

-

This is a popup

+

This is a pop-up

-

This is a popup

+

This is a pop-up

-
+
-

This is a popup

+

This is a pop-up

-
-

This is a popup

+
+

This is a pop-up

- +
-

This is a popup

+

This is a pop-up

@@ -103,18 +103,18 @@ diff --git a/testing/web-platform/tests/html/semantics/popups/popup-invoking-attribute.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-invoking-attribute.tentative.html index 4a40768647156..eba8f553f6092 100644 --- a/testing/web-platform/tests/html/semantics/popups/popup-invoking-attribute.tentative.html +++ b/testing/web-platform/tests/html/semantics/popups/popup-invoking-attribute.tentative.html @@ -28,7 +28,7 @@ return {expectedBehavior: (t || s) ? "show" : "none", expectedId: t || s || 1}; }; const noActivationLogic = (t,s,h) => { - // This does not activate any popups. + // This does not activate any pop-ups. return {expectedBehavior: "none", expectedId: 1}; } function activateTextInputFn(arrowChoice) { @@ -83,7 +83,7 @@ name: ``, makeElement: makeElementWithType('input',type), invokeFn: activateTextInputFn('down'), - getExpectedLogic: noActivationLogic, // None of these support popup invocation + getExpectedLogic: noActivationLogic, // None of these support pop-up invocation supported: false, }; }); @@ -117,59 +117,59 @@ s_set.forEach(s => { h_set.forEach(h => { promise_test(async test => { - const popup1 = Object.assign(document.createElement('div'),{popup: type, id: 'popup-1'}); - const popup2 = Object.assign(document.createElement('div'),{popup: type, id: 'popup-2'}); - assert_equals(popup1.popup,type); - assert_equals(popup2.popup,type); - assert_not_equals(popup1.id,popup2.id); + const popUp1 = Object.assign(document.createElement('div'),{popUp: type, id: 'pop-up-1'}); + const popUp2 = Object.assign(document.createElement('div'),{popUp: type, id: 'pop-up-2'}); + assert_equals(popUp1.popUp,type); + assert_equals(popUp2.popUp,type); + assert_not_equals(popUp1.id,popUp2.id); const invoker = testcase.makeElement(test); - if (t) invoker.setAttribute('togglepopup',t===1 ? popup1.id : popup2.id); - if (s) invoker.setAttribute('showpopup',s===1 ? popup1.id : popup2.id); - if (h) invoker.setAttribute('hidepopup',h===1 ? popup1.id : popup2.id); - assert_true(!document.getElementById(popup1.id)); - assert_true(!document.getElementById(popup2.id)); - document.body.appendChild(popup1); - document.body.appendChild(popup2); + if (t) invoker.setAttribute('togglepopup',t===1 ? popUp1.id : popUp2.id); + if (s) invoker.setAttribute('showpopup',s===1 ? popUp1.id : popUp2.id); + if (h) invoker.setAttribute('hidepopup',h===1 ? popUp1.id : popUp2.id); + assert_true(!document.getElementById(popUp1.id)); + assert_true(!document.getElementById(popUp2.id)); + document.body.appendChild(popUp1); + document.body.appendChild(popUp2); test.add_cleanup(() => { - popup1.remove(); - popup2.remove(); + popUp1.remove(); + popUp2.remove(); }); const {expectedBehavior, expectedId} = testcase.getExpectedLogic(t,s,h); const otherId = expectedId !== 1 ? 1 : 2; - function assert_popup(num,state,message) { + function assert_popUp(num,state,message) { assert_true(num>0,`Invalid expectedId ${num}`); - assert_equals((num===1 ? popup1 : popup2).matches(':top-layer'),state,message || ""); + assert_equals((num===1 ? popUp1 : popUp2).matches(':top-layer'),state,message || ""); } - assert_popup(expectedId,false); - assert_popup(otherId,false); + assert_popUp(expectedId,false); + assert_popUp(otherId,false); await testcase.invokeFn(invoker); - assert_popup(otherId,false,'The other popup should never change'); + assert_popUp(otherId,false,'The other pop-up should never change'); switch (expectedBehavior) { case "toggle": case "show": - assert_popup(expectedId,true,'Toggle or show should show the popup'); - (expectedId===1 ? popup1 : popup2).hidePopup(); // Hide the popup + assert_popUp(expectedId,true,'Toggle or show should show the pop-up'); + (expectedId===1 ? popUp1 : popUp2).hidePopup(); // Hide the pop-up break; case "hide": case "none": - assert_popup(expectedId,false,'Hide or none should leave the popup hidden'); + assert_popUp(expectedId,false,'Hide or none should leave the pop-up hidden'); break; default: assert_unreached(); } - (expectedId===1 ? popup1 : popup2).showPopup(); // Show the popup directly - assert_popup(expectedId,true); - assert_popup(otherId,false); + (expectedId===1 ? popUp1 : popUp2).showPopup(); // Show the pop-up directly + assert_popUp(expectedId,true); + assert_popUp(otherId,false); await testcase.invokeFn(invoker); - assert_popup(otherId,false,'The other popup should never change'); + assert_popUp(otherId,false,'The other pop-up should never change'); switch (expectedBehavior) { case "toggle": case "hide": - assert_popup(expectedId,false,'Toggle or hide should hide the popup'); + assert_popUp(expectedId,false,'Toggle or hide should hide the pop-up'); break; case "show": case "none": - assert_popup(expectedId,true,'Show or none should leave the popup showing'); + assert_popUp(expectedId,true,'Show or none should leave the pop-up showing'); break; default: assert_unreached(); @@ -185,7 +185,7 @@ -
This is popup #1
+
This is pop-up #1