blob: bfd74a2407e2d91cdb2a13b86945b040aeb6dcca [file] [log] [blame]
Steve Kobes1a092472019-11-25 15:54:131<!DOCTYPE html>
2<title>Layout Instability: fully clipped visual rect</title>
3<link rel="help" href="https://wicg.github.io/layout-instability/" />
4<style>
5
6body { margin: 0; }
7#clip { width: 0px; height: 600px; overflow: hidden; }
8#j { position: relative; width: 300px; height: 200px; }
9
10</style>
11<div id='clip'><div id='j'></div></div>
12<script src="/resources/testharness.js"></script>
13<script src="/resources/testharnessreport.js"></script>
14<script src="resources/util.js"></script>
15<script>
16
17promise_test(async () => {
18 const watcher = new ScoreWatcher;
19
20 // Wait for the initial render to complete.
21 await waitForAnimationFrames(2);
22
23 // Shift an element that is fully clipped by its container.
24 document.querySelector("#j").style.top = "200px";
25
26 await waitForAnimationFrames(3);
27 assert_equals(watcher.score, 0);
28}, "Fully clipped visual rect.");
29
30</script>
31
32