Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / sub-pixel / computedstylemargin.html
blob929d33bb64616dafb62bbf28043c7fcc91fc1390
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body style="margin: 0; padding: 0;">
7 <div style="margin: 0; width: 300px">
8 <div id="test" style="width: 200px; height: 200px; margin: 0.5px 1.5px 2.5px 3.5px; background: blue;"></div>
9 <div id="test2" style="width: 299px; height: 200px; margin: 5px auto; background: blue;"></div>
10 </div>
11 <script>
12 // Fixed width margins.
13 var style = window.getComputedStyle(document.getElementById('test'));
14 shouldBe('style.marginTop', "'0.5px'");
15 shouldBe('style.marginRight', "'1.5px'");
16 shouldBe('style.marginBottom', "'2.5px'");
17 shouldBe('style.marginLeft', "'3.5px'");
19 // Auto left/right margin.
20 var style = window.getComputedStyle(document.getElementById('test2'));
21 shouldBe('style.marginLeft', "'0.5px'");
22 shouldBe('style.marginRight', "'0.5px'");
23 </script>
24 </body>
25 </html>