From b0aec2735d23d33696077521ba590bf80a7ad428 Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Thu, 10 Nov 2022 15:03:00 +0000 Subject: [PATCH] Bug 1795799 [wpt PR 36512] - Remove popup=hint functionality, a=testonly Automatic update from web-platform-tests Remove popup=hint functionality Per the [1] resolution, we're going to wait to spec/implement popup=hint, until we have a chance to resolve some of the blocking issues. This CL removes all functionality for popup=hint. I thought about adding another flag to gate this functionality, but the logic is already complex, and I didn't want to complicate it further. When the time comes to put it back, this CL can be reverted. [1] https://github.com/openui/open-ui/issues/617#issuecomment-1278015741 Bug: 1307772 Change-Id: Ic9122d7e362eb1c57ef7ea8b6e080a866fca5724 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3957293 Commit-Queue: Aaron Leventhal Reviewed-by: Aaron Leventhal Auto-Submit: Mason Freed Reviewed-by: Joey Arhar Commit-Queue: Mason Freed Cr-Commit-Position: refs/heads/main@{#1063078} -- wpt-commits: ad8a1a63482e80aed25a11cfca4d51fec774d380 wpt-pr: 36512 --- .../popup-appearance-ref.tentative.html | 12 +- .../popups/popup-appearance.tentative.html | 12 +- .../popup-attribute-basic.tentative.html | 36 ++-- ...pup-backdrop-appearance-ref.tentative.html | 2 +- .../popup-backdrop-appearance.tentative.html | 2 +- .../popup-defaultopen-hints.tentative.html | 20 --- .../popup-invoking-attribute.tentative.html | 2 +- .../popups/popup-light-dismiss.tentative.html | 47 ----- .../popups/popup-manual-crash.tentative.html | 12 +- .../popups/popup-types.tentative.html | 163 +----------------- 10 files changed, 41 insertions(+), 267 deletions(-) delete mode 100644 testing/web-platform/tests/html/semantics/popups/popup-defaultopen-hints.tentative.html diff --git a/testing/web-platform/tests/html/semantics/popups/popup-appearance-ref.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-appearance-ref.tentative.html index 43e3fd4ab7ad9..57edb7c583bf8 100644 --- a/testing/web-platform/tests/html/semantics/popups/popup-appearance-ref.tentative.html +++ b/testing/web-platform/tests/html/semantics/popups/popup-appearance-ref.tentative.html @@ -5,16 +5,14 @@ -

There should be five pop-ups with similar appearance.

+

There should be four pop-ups with similar appearance.

Blank
Auto
-
Hint
Manual
Invalid
diff --git a/testing/web-platform/tests/html/semantics/popups/popup-appearance.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-appearance.tentative.html index 942734e203e13..3a848336c5f3a 100644 --- a/testing/web-platform/tests/html/semantics/popups/popup-appearance.tentative.html +++ b/testing/web-platform/tests/html/semantics/popups/popup-appearance.tentative.html @@ -7,18 +7,16 @@ -

There should be five pop-ups with similar appearance.

+

There should be four pop-ups with similar appearance.

Blank
Auto
-
Hint
Manual
Invalid
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 c20499c3f30fd..de8d4d5f89700 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 @@ -11,7 +11,6 @@
Pop up
Pop up
Pop up
-
Pop up
Pop up
Different element type
Different element type
@@ -116,20 +115,18 @@ // Getting the `popUp` IDL value only retrieves valid values. const popUp = createPopUp(t); assert_equals(popUp.popUp,'auto'); - popUp.setAttribute('popup','hint'); - assert_equals(popUp.popUp,'hint'); - popUp.setAttribute('popup','HiNt'); - assert_equals(popUp.popUp,'hint','Case is normalized in IDL'); - assert_equals(popUp.getAttribute('popup'),'HiNt','Case is *not* normalized/changed in the content attribute'); - popUp.popUp='hInT'; - assert_equals(popUp.popUp,'hint','Case is normalized in IDL'); - assert_equals(popUp.getAttribute('popup'),'hInT','Value set from IDL is propagated exactly to the content attribute'); + popUp.setAttribute('popup','auto'); + assert_equals(popUp.popUp,'auto'); + popUp.setAttribute('popup','AuTo'); + assert_equals(popUp.popUp,'auto','Case is normalized in IDL'); + assert_equals(popUp.getAttribute('popup'),'AuTo','Case is *not* normalized/changed in the content attribute'); + popUp.popUp='aUtO'; + assert_equals(popUp.popUp,'auto','Case is normalized in IDL'); + assert_equals(popUp.getAttribute('popup'),'aUtO','Value set from IDL is propagated exactly to the content attribute'); popUp.setAttribute('popup','invalid'); assert_equals(popUp.popUp,'manual','Invalid values should reflect as "manual"'); popUp.removeAttribute('popup'); assert_equals(popUp.popUp,null,'No value should reflect as null'); - popUp.popUp='hint'; - assert_equals(popUp.getAttribute('popup'),'hint'); popUp.popUp='auto'; assert_equals(popUp.getAttribute('popup'),'auto'); popUp.popUp=''; @@ -176,11 +173,11 @@ test((t) => { const popUp = createPopUp(t); assertIsFunctionalPopUp(popUp); - popUp.setAttribute('popup','hint'); // Change pop-up type + popUp.setAttribute('popup','manual'); // Change pop-up type assertIsFunctionalPopUp(popUp); popUp.setAttribute('popup','invalid'); // Change pop-up type to something invalid assertIsFunctionalPopUp(popUp); - popUp.popUp = 'hint'; // Change pop-up type via IDL + popUp.popUp = 'manual'; // Change pop-up type via IDL assertIsFunctionalPopUp(popUp); popUp.popUp = 'invalid'; // Make invalid via IDL (treated as "manual") assertIsFunctionalPopUp(popUp); @@ -190,11 +187,7 @@ const popUp = createPopUp(t); popUp.showPopUp(); assert_true(popUp.matches(':open')); - popUp.setAttribute('popup','hint'); // Change pop-up type - assert_false(popUp.matches(':open')); - popUp.showPopUp(); - assert_true(popUp.matches(':open')); - popUp.setAttribute('popup','manual'); + popUp.setAttribute('popup','manual'); // Change pop-up type assert_false(popUp.matches(':open')); popUp.showPopUp(); assert_true(popUp.matches(':open')); @@ -217,7 +210,8 @@ } } - ["auto","hint","manual"].forEach(type => { + const validTypes = ["auto","manual"]; + validTypes.forEach(type => { test((t) => { const popUp = createPopUp(t); popUp.setAttribute('popup',type); @@ -241,7 +235,6 @@ } }); - const validTypes = ["auto","hint","manual"]; function interpretedType(typeString,method) { if (validTypes.includes(typeString)) return typeString; @@ -308,8 +301,7 @@ popUp.hidePopUp(); break; case 'auto': - case 'hint': - assert_false(popUp.matches(':open'),'A popup=auto/hint should light-dismiss'); + assert_false(popUp.matches(':open'),'A popup=auto should light-dismiss'); break; } } diff --git a/testing/web-platform/tests/html/semantics/popups/popup-backdrop-appearance-ref.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-backdrop-appearance-ref.tentative.html index 4cb0d99569944..34dc357ba208d 100644 --- a/testing/web-platform/tests/html/semantics/popups/popup-backdrop-appearance-ref.tentative.html +++ b/testing/web-platform/tests/html/semantics/popups/popup-backdrop-appearance-ref.tentative.html @@ -33,7 +33,7 @@

Test for [popup]::backdrop presence and stacking order. The test passes if there are 3 stacked boxes, with the brightest green on top.

Bottom -
Middle +
Middle
Top
diff --git a/testing/web-platform/tests/html/semantics/popups/popup-backdrop-appearance.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-backdrop-appearance.tentative.html index a2f761fa8170d..1a4c6bac65f49 100644 --- a/testing/web-platform/tests/html/semantics/popups/popup-backdrop-appearance.tentative.html +++ b/testing/web-platform/tests/html/semantics/popups/popup-backdrop-appearance.tentative.html @@ -35,7 +35,7 @@

Test for [popup]::backdrop presence and stacking order. The test passes if there are 3 stacked boxes, with the brightest green on top.

Bottom -
Middle +
Middle
Top
diff --git a/testing/web-platform/tests/html/semantics/popups/popup-defaultopen-hints.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-defaultopen-hints.tentative.html deleted file mode 100644 index a7535fab20342..0000000000000 --- a/testing/web-platform/tests/html/semantics/popups/popup-defaultopen-hints.tentative.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - -
This is a popup=hint with defaultopen, which should NOT be open upon load
- - 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 b281e1f4c06b1..63a3c7f443a34 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 @@ -67,7 +67,7 @@ ...unsupportedTypes, ]; window.addEventListener('load', () => { - ["auto","hint","manual"].forEach(type => { + ["auto","manual"].forEach(type => { invokers.forEach(testcase => { let t_set = [1], s_set = [1], h_set = [1]; if (testcase.supported) { diff --git a/testing/web-platform/tests/html/semantics/popups/popup-light-dismiss.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-light-dismiss.tentative.html index 8848806cab773..d012942c14aa5 100644 --- a/testing/web-platform/tests/html/semantics/popups/popup-light-dismiss.tentative.html +++ b/testing/web-platform/tests/html/semantics/popups/popup-light-dismiss.tentative.html @@ -458,53 +458,6 @@ },'Ensure circular/convoluted ancestral relationships are functional, with a direct showPopUp()'); - -
Popup
-
Hint
-
Manual
- - - -
Pop-up 1
Pop-up 2
Pop-up 3
diff --git a/testing/web-platform/tests/html/semantics/popups/popup-manual-crash.tentative.html b/testing/web-platform/tests/html/semantics/popups/popup-manual-crash.tentative.html index b3430a451333c..bbc01a47ad935 100644 --- a/testing/web-platform/tests/html/semantics/popups/popup-manual-crash.tentative.html +++ b/testing/web-platform/tests/html/semantics/popups/popup-manual-crash.tentative.html @@ -6,17 +6,15 @@

This test passes if it does not crash.

-
Blank -
Auto
+
Auto1 +
Auto2
-
Hint
Manual
-
- -
-
Popup 1 -
Popup 2 -

Anchor

-
Popup 3
-
-
-
Hint anchored to pop-up
-
- -
-
Hint -
Nested hint
-
- -
- -
-
Hint -
Nested auto (note - never visible, since inside display:none subtree)
-
- -
- -
-
Auto -
Nested Auto
-
Nested hint
-
- -
- -
-
Auto
-
Non-Nested hint
- -