wpt / css / css-contain / content-visibility / content-visibility-with-popover-top-layer-004.html

Status: PASS | Duration: 6ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-contain/content-visibility/content-visibility-with-popover-top-layer-004.html

<!doctype html>
<html class="reftest-wait">
<meta charset="utf8">
<title>CSS Content Visibility: popover shows under c-v auto</title>
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
<link rel="match" href="spacer-with-popover-top-layer-ref.html">
<meta name="assert" content="top layer popovers render under c-v auto">

<script src="/common/reftest-wait.js"></script>

<style>
.box { width: 100px; height: 100px; border: 1px solid black; }
.auto { content-visibility: auto }
.spacer { width: 10px; height: 3000px; background: lightblue; }
</style>

<div class=spacer></div>
<div id=container class="box auto">
content
<div popover id=popover>PASS<div id=inner></div></div>
</div>

<script>
function runTest() {
  popover.showPopover();
  takeScreenshot();
}

onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>

/css/css-contain/content-visibility/spacer-with-popover-top-layer-ref.html

<!doctype html>
<meta charset="utf8">
<title>CSS Content Visibility: popover shows under c-v auto (ref)</title>

<style>
.box { width: 100px; height: 100px; border: 1px solid black; }
.spacer { width: 10px; height: 3000px; background: lightblue; }
</style>

<div class=spacer></div>
<div id=container class=box>
content
<div popover id=popover>PASS<div id=inner></div></div>
</div>

<script>
popover.showPopover();
</script>