Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css3 / calc / simplification.html
blobc9de6dbdfe19bc26bb73e093eb6f8d48d86a4f98
1 <!DOCTYPE HTML>
2 <div id="dummy"></div>
3 <div id="results">This tests parse time simplification in calc()<br><br></div>
4 <script>
5 if (window.testRunner)
6 window.testRunner.dumpAsText();
8 var tests = [
9 "100px * (25 + 5)",
10 "100em * (25 - 5)",
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",
18 "100px + 1in",
19 "10 * 10px + 0.5 * 2in",
20 "100px + 1in + 10%",
21 "100px - 1in",
22 "50cm + 50cm",
23 "50cm + 10in + 100mm",
24 "100px + 1em",
25 "100px + 1em + 100px",
26 "1em + 1rem",
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>";
36 </script>