Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / large-number-round-trip.html
blob03244f7039d85bf54159fb92996a55849c91be9e
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <html lang="en">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <title>Round-trip large values</title>
8 <style type="text/css" media="screen">
9 #box {
10 position: absolute;
12 </style>
13 </head>
14 <body>
15 <div id="box">
16 </div>
17 <div id="results">
18 </div>
19 <script type="text/javascript" charset="utf-8">
20 if (window.testRunner)
21 testRunner.dumpAsText();
23 var output = [];
25 function test(value)
27 var box = document.getElementById('box');
29 var testValue = value + "px";
30 box.style.left = testValue;
32 var leftValue = window.getComputedStyle(box, null).left;
34 box.style.left = "0px";
35 box.style.left = leftValue;
36 var newLeftValue = window.getComputedStyle(box, null).left;
38 var results = document.getElementById('results');
39 var result;
40 if (leftValue == newLeftValue)
41 output.push("PASS: read " + testValue + " back as " + leftValue + ", read again as " + newLeftValue);
42 else
43 output.push("FAIL: read " + testValue + " back as " + leftValue + ", read again as " + newLeftValue);
46 test(90010000);
47 test(-33554430);
48 test(-90010000);
50 document.getElementById('results').innerHTML = output.join('<br>');
51 </script>
52 </body>
53 </html>