blob: db087fe06735e672216ab7577fa75dcd9ad3a031 [file] [log] [blame]
Chris Harrelson92d9bd42020-11-25 00:00:421<!DOCTYPE html>
2<title>Layout Instability: content-visibility:hidden content</title>
3<link rel="help" href="https://wicg.github.io/layout-instability/" />
Xianzhu Wang85a49cb2020-12-16 18:18:454<script src="/resources/testharness.js"></script>
5<script src="/resources/testharnessreport.js"></script>
6<script src="resources/util.js"></script>
7<script>
8// These scripts need to be before the contents because we need to ensure no
9// layout shifts during page load.
10promise_test(async () => {
11 const watcher = new ScoreWatcher;
12
13 // Wait for the initial render to complete.
14 await waitForAnimationFrames(2);
15 assert_equals(watcher.score, 0);
16}, 'on-screen content-visibility:auto');
17</script>
Chris Harrelson92d9bd42020-11-25 00:00:4218<style>
19 #target {
20 content-visibility: hidden;
21 contain-intrinsic-size: 1px;
22 width: 100px;
23 }
24</style>
25<div id=target>
26 <div style="width: 100px; height: 100px"></div>
27</div>