Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-background-size.html
blobd0c6e380b2e24f894700d8238c5b8a1c367fd4b1
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 #sizePair { -webkit-background-size: 10px 20px; }
6 #sizeSingle { -webkit-background-size: 10px; }
7 #zeroSizePair { -webkit-background-size: 0px 0px; }
8 #zeroSizeSingle { -webkit-background-size: 0px; }
9 </style>
10 <script type="text/javascript">
11 function log(msg)
13 document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
16 function test(id, prop)
18 var ob = document.getElementById(id + 'Pair');
19 log('getPropertyValue(' + prop + '): ' + document.defaultView.getComputedStyle(ob, null).getPropertyValue(prop));
20 ob = document.getElementById(id + 'Single');
21 log('getPropertyValue(' + prop + '): ' + document.defaultView.getComputedStyle(ob, null).getPropertyValue(prop));
24 function runTests()
26 if (window.testRunner)
27 testRunner.dumpAsText();
29 test('size', '-webkit-background-size');
31 log('');
33 log('Test getting background size of 0.')
34 test('zeroSize', '-webkit-background-size');
36 log('');
38 log('Test getting initial value of the background size.')
39 var ob = document.getElementById('sizeInit');
40 log('getPropertyValue(-webkit-background-size): ' + document.defaultView.getComputedStyle(ob, null).getPropertyValue('-webkit-background-size'));
42 </script>
43 </head>
44 <body onload="runTests();">
45 <p>Test calling getPropertyValue on computed styles for -webkit-backround-size properties.</p>
46 <pre id="console"></pre>
48 <div id="sizePair"></div>
49 <div id="sizeSingle"></div>
50 <div id="zeroSizePair"></div>
51 <div id="zeroSizeSingle"></div>
52 <div id="sizeInit"></div>
53 </body>
54 </html>