Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-margin-auto.html
blob587fbebbe506e79e6f912bf5261a7cedbfbc5d72
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 #foo {
6 background: purple;
7 border: 10px double #000000;
8 width: 50%;
9 height: auto;
11 margin-left: auto;
12 margin-top: auto;
13 margin-right: auto;
14 margin-bottom: auto;
16 padding-left: auto;
17 left: auto;
18 color: white;
19 font: 24px 'Lucida Grande';
20 line-height: 24px;
22 </style>
24 <script>
25 function log(msg) {
26 document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
29 function test(prop) {
30 var div = document.getElementById('foo');
31 log(prop + ': ' + window.getComputedStyle(div, null).getPropertyValue(prop));
34 function runTests() {
35 if (window.testRunner)
36 testRunner.dumpAsText();
38 test('margin-left');
39 test('margin-top');
40 test('margin-right');
41 test('margin-bottom');
43 </script>
44 </head>
46 <body onload="runTests();">
47 <p>Test calling getPropertyValue on computed margin styles.</p>
48 <pre id="console"></pre>
50 <div id="foo">Test</div>
51 </body>
52 </html>