| <!DOCTYPE html> |
| <html class="reftest-wait"> |
| <meta charset="utf-8"> |
| <title>Content Visibility: hidden video</title> |
| <link rel="author" title="Martin Robinson" href="mailto:[email protected]"> |
| <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> |