-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test to popover and postioned elements
Differential Revision: https://phabricator.services.mozilla.com/D201729 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1828898 gecko-commit: e3cd1999f1dac41420e53e819c582626fca67178 gecko-reviewers: emilio
- Loading branch information
1 parent
57308ed
commit c5e5bdb
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
html/semantics/popovers/popover-open-overflow-display-2.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<link rel=help href="https://html.spec.whatwg.org/multipage/popover.html"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="resources/popover-utils.js"></script> | ||
<script> | ||
async function checkStatus(p) { | ||
p.showPopover(); | ||
await waitForRender(); | ||
assert_true(p.matches(":popover-open")); | ||
p.hidePopover(); | ||
await waitForRender(); | ||
} | ||
</script> | ||
|
||
<div id=container style="overflow: hidden; position: absolute;"> | ||
<div popover="auto" id=p1 style="position: absolute; top: 100px;">Absolute popover inside absolute element</div> | ||
</div> | ||
<script> | ||
promise_test(async () => { | ||
await checkStatus(document.querySelector("#p1")); | ||
}, "Absolute popover inside absolute element"); | ||
</script> | ||
|
||
<div id=p2 popover="auto" style="overflow: hidden; position: absolute;"> | ||
<div style="position: absolute; top: 100px;">Absolute element inside absolute popover</div> | ||
</div> | ||
<script> | ||
promise_test(async () => { | ||
await checkStatus(document.querySelector("#p2")); | ||
}, "Absolute element inside absolute popover"); | ||
</script> | ||
|
||
<div id=container style="overflow: hidden; position: fixed;"> | ||
<div popover="auto" id=p3 style="position: fixed; top: 100px;">Fixed popover inside fixed element</div> | ||
</div> | ||
<script> | ||
promise_test(async () => { | ||
await checkStatus(document.querySelector("#p3")); | ||
}, "Fixed popover inside fixed element"); | ||
</script> | ||
|
||
<div id=p4 popover="auto" style="overflow: hidden; position: fixed;"> | ||
<div style="position: fixed; top: 100px;">Fixed element inside fixed popover</div> | ||
</div> | ||
<script> | ||
promise_test(async () => { | ||
await checkStatus(document.querySelector("#p4")); | ||
}, "Fixed element inside fixed popover"); | ||
</script> | ||
|
||
<div id=container style="overflow: hidden; position: fixed;"> | ||
<div popover="auto" id=p5 style="position: absolute; top: 100px;">Absolute popover inside fixed element</div> | ||
</div> | ||
<script> | ||
promise_test(async () => { | ||
await checkStatus(document.querySelector("#p5")); | ||
}, "Absolute popover inside fixed element"); | ||
</script> | ||
|
||
<div id=p6 popover="auto" style="overflow: hidden; position: absolute;"> | ||
<div style="position: fixed; top: 100px;">Fixed element inside absolute popover</div> | ||
</div> | ||
<script> | ||
promise_test(async () => { | ||
await checkStatus(document.querySelector("#p6")); | ||
}, "Fixed element inside absolute popover"); | ||
</script> |