3 <div id=
"results">This tests parse time simplification in calc()
<br><br></div>
6 window
.testRunner
.dumpAsText();
11 "100ex * (2 * 5 - 5)",
12 "100cm * (5 - 4 / 5)",
13 "100mm * (2.4 * 5 - 8 / 5)",
14 "100in * (6 * (5 - 4) / 8)",
15 "1px * (3 + 1/(7 + 1/(15 + 1/(1 + 1/(292 + 1/(1 + 1/(1 + 1/(1 + 1))))))))",
16 "100pc * 20 + 100rem * 10 - 100ch * 5 + 100pc",
17 "((100px + 20 * 5px) * 10 - 5 * (10em * 5 + 10em)) * 2",
19 "10 * 10px + 0.5 * 2in",
23 "50cm + 10in + 100mm",
25 "100px + 1em + 100px",
29 var results
= document
.getElementById("results");
30 var dummy
= document
.getElementById("dummy");
31 for (var i
= 0; i
< tests
.length
; ++i
) {
32 var expression
= tests
[i
];
33 dummy
.style
.width
= 'calc(' + expression
+ ')';
34 results
.innerHTML
+= expression
+ " => " + dummy
.style
.width
+ "<br>";