summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-video.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-video.html')
-rw-r--r--testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-video.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-video.html b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-video.html
new file mode 100644
index 0000000000..bed5954fe4
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-video.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>Content Visibility: hidden video</title>
+<link rel="author" title="Martin Robinson" href="mailto:mrobinson@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
+<link rel="match" href="content-visibility-video-ref.html">
+<meta name="assert" content="content-visibility hidden video element does not paint replaced content">
+
+<script src="/common/reftest-wait.js"></script>
+
+<style>
+video {
+ width: 200px;
+ height: 200px;
+ background: green;
+ border: 1px solid black;
+}
+.hidden {
+ content-visibility: hidden;
+}
+</style>
+
+<body>
+ <video id="video" poster="../support/blue-100x100.png" src="../support/white.webm" controls></video>
+</body>
+
+<script>
+async function runTest() {
+ video.classList.add("hidden");
+ video.play();
+ requestAnimationFrame(takeScreenshot);
+}
+
+window.onload = () => {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(runTest);
+ });
+};
+</script>
+</html>