Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css3 / calc / catch-divide-by-0.html
blob7a1a21bfcd085e9acfa7a53cea382a8db7b9a1c7
1 <!DOCTYPE HTML>
2 <div id="dummy"></div>
3 <div id="results">This tests catching of divide by 0 in calc() at parse time<br><br></div>
4 <script>
5 if (window.testRunner)
6 window.testRunner.dumpAsText();
8 var tests = [
9 "100px / 0",
10 "100px / (0)",
11 "100px / (2 - 2)",
12 "100px / (2 - (-62 + 64))",
13 "100px * (1 / 0)",
14 "100px * (1 / (0))",
15 "100px * (1 / (2 - 2))",
16 "100px * (1 / (2 - (-62 + 64)))",
19 var results = document.getElementById("results");
20 var dummy = document.getElementById("dummy");
21 for (var i = 0; i < tests.length; ++i) {
22 var expression = tests[i];
23 dummy.style.width = 'calc(' + expression + ')';
24 results.innerHTML += expression + " => " + dummy.style.width + "<br>";
26 </script>