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; }
10 <script type=
"text/javascript">
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
));
26 if (window
.testRunner
)
27 testRunner
.dumpAsText();
29 test('size', '-webkit-background-size');
33 log('Test getting background size of 0.')
34 test('zeroSize', '-webkit-background-size');
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'));
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>