diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-003.html')
-rw-r--r-- | testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-003.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-003.html b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-003.html new file mode 100644 index 0000000000..b8685954ff --- /dev/null +++ b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-003.html @@ -0,0 +1,36 @@ +<!doctype html> +<html class="reftest-wait"> +<meta charset="utf8"> +<title>CSS Content Visibility: dialog shows when rendered</title> +<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> +<link rel="match" href="content-with-top-layer-ref.html"> +<meta name="assert" content="top layer dialogs start rendering when c-v is removed"> + +<script src="/common/reftest-wait.js"></script> + +<style> +.box { width: 100px; height: 100px; border: 1px solid black; } +.hidden { content-visibility: hidden } +</style> + +<div id=container class=box> +This test passes if you can see “PASS” in a white box. +<dialog id=dialog>PASS<div id=inner></div></dialog> +</div> +text + +<script> +function unhide() { + container.classList.remove("hidden"); + takeScreenshot(); +} + +function runTest() { + container.classList.add("hidden"); + dialog.showModal(); + requestAnimationFrame(unhide); +} + +onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); +</script> |