Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / devtools / server / tests / chrome / test_overflowing-body.html
blob1fe52e00115f8fe908771279628164519d4283d3
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 Test InspectorUtils.GetOverflowingChildrenOfElement applied to the body element
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test InspectorUtils.GetOverflowingChildrenOfElement on the body element</title>
9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <style>
11 body {
12 overflow: auto;
13 margin: 0;
15 .tallBox {
16 overflow: auto;
17 background: lavender;
18 width: 200px;
19 height: 110vh;
21 </style>
22 <script>
23 'use strict';
25 SimpleTest.waitForExplicitFinish();
26 const InspectorUtils = SpecialPowers.InspectorUtils;
28 function runTests() {
29 const body = document.documentElement;
30 const overflowing_children = InspectorUtils.getOverflowingChildrenOfElement(body);
32 is(overflowing_children.length, 1, `body has the expected number of children.`);
34 SimpleTest.finish();
36 window.onload = runTests;
37 </script>
38 </head>
39 <body>
40 <div class="tallBox"><div>
41 </body>
42 </html>