Debian Codegraph @

testing/web-platform/mozilla/tests/mathml/menclose/menclose-4.html

raw
1 <!DOCTYPE html>
2 <html class="reftest-wait">
3 <head>
4 <title>menclose inner and outer circle</title>
5 <meta charset="utf-8"/>
6 <link rel="match" href="data:text/html,<body>Pass"/>
7 <script type="text/javascript">
8 function doTest()
9 {
10 var box1 = document.getElementById("outer").getBoundingClientRect();
11 var box2 = document.getElementById("inner").getBoundingClientRect();
12 var epsilon = 0.1;
13 if ((box1.width >= ((Math.sqrt(2) - epsilon)*box2.width)) && (box1.height >= ((Math.sqrt(2) - epsilon)*box2.height))) {
14 document.body.innerHTML = "Pass";
15 }
16 document.documentElement.removeAttribute("class");
17 }
18 document.documentElement.addEventListener("TestRendered",doTest);
19 </script>
20 </head>
21 <body>
22 <div style="position: absolute; left: 20px; top: 20px;">
23 <math>
24 <menclose id="outer" notation="circle">
25 <mspace id="inner" width="200px" height="100px"></mspace>
26 </menclose>
27 </math>
28 </div>
29 </body>
30 </html>