outline.html (749B)
1 <!DOCTYPE html> 2 <title>Layout Instability: outline doesn't contribute to layout shift</title> 3 <link rel="help" href="https://wicg.github.io/layout-instability/" /> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="resources/util.js"></script> 7 <div id="target" style="width: 300px; height: 300px; background: blue"></div> 8 <script> 9 promise_test(async () => { 10 const watcher = new ScoreWatcher; 11 12 // Wait for the initial render to complete. 13 await waitForAnimationFrames(2); 14 15 // Add outline for target. This should not generate a shift. 16 target.style.outline = "10px solid blue"; 17 18 await waitForAnimationFrames(3); 19 assert_equals(watcher.score, 0); 20 }, "Outline."); 21 </script>