diff --git a/testing/web-platform/tests/html/semantics/popovers/popover-stacking-anchor-attribute.tentative.html b/testing/web-platform/tests/html/semantics/popovers/popover-stacking-anchor-attribute.tentative.html new file mode 100644 index 0000000000000..6895b8625ac7e --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popovers/popover-stacking-anchor-attribute.tentative.html @@ -0,0 +1,104 @@ + + + + + + + + + + +
+

anchor attribute relationship

+

Ancestor popover

+

Child popover

+
+ +
+

indirect anchor attribute relationship

+
+

Ancestor popover

+
+
+ Anchor +
+
+
+

Child popover

+
+ + + +

This is popover #1

+ + +
+

This is popover #2

+ +
+

This is popover #3

+

This is popover #4

+ + +This is a dialog + + + + + diff --git a/testing/web-platform/tests/html/semantics/popovers/popover-stacking.html b/testing/web-platform/tests/html/semantics/popovers/popover-stacking.html index 7452fae7da309..1c352d566e747 100644 --- a/testing/web-platform/tests/html/semantics/popovers/popover-stacking.html +++ b/testing/web-platform/tests/html/semantics/popovers/popover-stacking.html @@ -1,7 +1,6 @@ - @@ -46,37 +45,16 @@

Child popover

-
-

anchor attribute relationship

-

Ancestor popover

-

Child popover

-
- -
-

indirect anchor attribute relationship

-
-

Ancestor popover

-
-
- Anchor -
-
-
-

Child popover

-
- -

This is popover #1

+ +

This is popover #1

- -
-

This is popover #2

- +

This is popover #2

+ +

This is popover #3

+
-

This is popover #3

-

This is popover #4

- This is a dialog @@ -105,7 +83,7 @@ },descr); } - const popovers = [p1, p2, p3, p4]; + const popovers = [p1, p2, p3]; function assertState(...states) { assert_equals(popovers.length,states.length); @@ -113,40 +91,21 @@ assert_equals(popovers[i].matches(':popover-open'),states[i],`Popover #${i+1} incorrect state`); } } - test(function() { - assertState(false,false,false,false); - p1.showPopover(); - assertState(true,false,false,false); - p2.showPopover(); - assertState(true,true,false,false); - p3.showPopover(); - assertState(true,true,true,false); - // P4 is a sibling of P2, so showing it should - // close P2 and P3. - p4.showPopover(); - assertState(true,false,false,true); - // P2 should close P4 now. - p2.showPopover(); - assertState(true,true,false,false); - // Hiding P1 should hide all. - p1.hidePopover(); - assertState(false,false,false,false); - }, "more complex nesting, all using anchor ancestry") test(function() { function openManyPopovers() { p1.showPopover(); p2.showPopover(); p3.showPopover(); - assertState(true,true,true,false); + assertState(true,true,true); } openManyPopovers(); d1.show(); // Dialog.show() should hide all popovers. - assertState(false,false,false,false); + assertState(false,false,false); d1.close(); openManyPopovers(); d1.showModal(); // Dialog.showModal() should also hide all popovers. - assertState(false,false,false,false); + assertState(false,false,false); d1.close(); }, "popovers should be closed by dialogs") @@ -156,7 +115,7 @@ d1.show(); assert_true(d1.open); p1.showPopover(); - assertState(true,false,false,false); + assertState(true,false,false); assert_true(d1.open); p1.hidePopover(); assert_true(d1.open); @@ -169,5 +128,4 @@ #p1 { top:350px; } #p2 { top:350px; left:200px; } #p3 { top:500px; } - #p4 { top:500px;left:200px; }