Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-background-size.html
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)
12         {
13             document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
14         }
15
16         function test(id, prop)
17         {
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));
22         }
23
24         function runTests()
25         {
26             if (window.testRunner)
27                 testRunner.dumpAsText();
28
29             test('size', '-webkit-background-size');
30             
31             log('');
32
33             log('Test getting background size of 0.')
34             test('zeroSize', '-webkit-background-size');
35
36             log('');
37
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'));
41         }
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>
47
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>