Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-background-shorthand.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
9
10 description("Test to make sure background shorthand properties returns CSSValueList properly.")
11
12 var testContainer = document.createElement("div");
13 testContainer.contentEditable = true;
14 document.body.appendChild(testContainer);
15
16 testContainer.innerHTML = '<div id="test">hello</div>';
17
18 e = document.getElementById('test');
19 computedStyle = window.getComputedStyle(e, null);
20
21 function checkComputedStyleValue() {
22     var before = window.getComputedStyle(e, null).getPropertyValue('background');
23     e.style.background = 'none';
24     e.style.background = before;
25     return (window.getComputedStyle(e, null).getPropertyValue('background') == before);
26 }
27
28 e.style.background = "red";
29 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box'");
30 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'");
31 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box'");
32 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2");
33 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5");
34 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3");
35 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
36 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
37 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
38 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).item(0).getStringValue()", "'none'");
39 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).item(0).getStringValue()", "'repeat'");
40 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).item(0).getStringValue()", "'scroll'");
41 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).toString()", "'[object CSSValueList]'");
42 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(0).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "0");
43 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(1).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "0");
44 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(0).item(0).getStringValue()", "'auto'");
45 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(1).item(0).getStringValue()", "'padding-box'");
46 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(2).item(0).getStringValue()", "'border-box'");
47 shouldBe("checkComputedStyleValue()", "true");
48
49 e.style.backgroundImage = "url(dummy://test.png)";
50 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / auto padding-box border-box'");
51 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'");
52 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / auto padding-box border-box'");
53 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2");
54 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5");
55 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3");
56 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
57 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
58 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
59 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).item(0).getStringValue()", "'dummy://test.png'");
60 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).item(0).getStringValue()", "'repeat'");
61 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).item(0).getStringValue()", "'scroll'");
62 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).toString()", "'[object CSSValueList]'");
63 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(0).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "0");
64 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(1).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "0");
65 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(0).item(0).getStringValue()", "'auto'");
66 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(1).item(0).getStringValue()", "'padding-box'");
67 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(2).item(0).getStringValue()", "'border-box'");
68 shouldBe("checkComputedStyleValue()", "true");
69
70 e.style.backgroundRepeat = "no-repeat";
71 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 0% 0% / auto padding-box border-box'");
72 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'");
73 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 0% 0% / auto padding-box border-box'");
74 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2");
75 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5");
76 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3");
77 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
78 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
79 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
80 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).item(0).getStringValue()", "'dummy://test.png'");
81 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).item(0).getStringValue()", "'no-repeat'");
82 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).item(0).getStringValue()", "'scroll'");
83 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).toString()", "'[object CSSValueList]'");
84 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(0).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "0");
85 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(1).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "0");
86 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(0).item(0).getStringValue()", "'auto'");
87 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(1).item(0).getStringValue()", "'padding-box'");
88 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(2).item(0).getStringValue()", "'border-box'");
89 shouldBe("checkComputedStyleValue()", "true");
90
91 e.style.backgroundAttachment = "fixed";
92 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 0% 0% / auto padding-box border-box'");
93 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'");
94 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 0% 0% / auto padding-box border-box'");
95 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2");
96 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5");
97 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3");
98 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
99 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
100 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
101 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).item(0).getStringValue()", "'dummy://test.png'");
102 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).item(0).getStringValue()", "'no-repeat'");
103 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).item(0).getStringValue()", "'fixed'");
104 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).toString()", "'[object CSSValueList]'");
105 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(0).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "0");
106 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(1).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "0");
107 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(0).item(0).getStringValue()", "'auto'");
108 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(1).item(0).getStringValue()", "'padding-box'");
109 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(2).item(0).getStringValue()", "'border-box'");
110 shouldBe("checkComputedStyleValue()", "true");
111
112 e.style.backgroundPosition = "right bottom";
113 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / auto padding-box border-box'");
114 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'");
115 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / auto padding-box border-box'");
116 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2");
117 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5");
118 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3");
119 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
120 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
121 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
122 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).item(0).getStringValue()", "'dummy://test.png'");
123 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).item(0).getStringValue()", "'no-repeat'");
124 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).item(0).getStringValue()", "'fixed'");
125 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).toString()", "'[object CSSValueList]'");
126 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(0).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "100");
127 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(1).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "100");
128 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(0).item(0).getStringValue()", "'auto'");
129 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(1).item(0).getStringValue()", "'padding-box'");
130 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(2).item(0).getStringValue()", "'border-box'");
131 shouldBe("checkComputedStyleValue()", "true");
132
133 e.style.backgroundSize = "cover";
134 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover padding-box border-box'");
135 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'");
136 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover padding-box border-box'");
137 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2");
138 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5");
139 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3");
140 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
141 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
142 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
143 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).item(0).getStringValue()", "'dummy://test.png'");
144 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).item(0).getStringValue()", "'no-repeat'");
145 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).item(0).getStringValue()", "'fixed'");
146 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).toString()", "'[object CSSValueList]'");
147 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(0).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "100");
148 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(1).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "100");
149 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(0).item(0).getStringValue()", "'cover'");
150 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(1).item(0).getStringValue()", "'padding-box'");
151 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(2).item(0).getStringValue()", "'border-box'");
152 shouldBe("checkComputedStyleValue()", "true");
153
154 e.style.backgroundOrigin = "content-box";
155 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box border-box'");
156 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'");
157 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box border-box'");
158 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2");
159 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5");
160 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3");
161 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
162 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
163 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
164 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).item(0).getStringValue()", "'dummy://test.png'");
165 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).item(0).getStringValue()", "'no-repeat'");
166 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).item(0).getStringValue()", "'fixed'");
167 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).toString()", "'[object CSSValueList]'");
168 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(0).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "100");
169 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(1).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "100");
170 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(0).item(0).getStringValue()", "'cover'");
171 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(1).item(0).getStringValue()", "'content-box'");
172 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(2).item(0).getStringValue()", "'border-box'");
173 shouldBe("checkComputedStyleValue()", "true");
174
175 e.style.backgroundClip = "padding-box";
176 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box padding-box'");
177 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'");
178 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box padding-box'");
179 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2");
180 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5");
181 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3");
182 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
183 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
184 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
185 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).item(0).getStringValue()", "'dummy://test.png'");
186 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).item(0).getStringValue()", "'no-repeat'");
187 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).item(0).getStringValue()", "'fixed'");
188 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).toString()", "'[object CSSValueList]'");
189 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(0).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "100");
190 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(1).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "100");
191 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(0).item(0).getStringValue()", "'cover'");
192 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(1).item(0).getStringValue()", "'content-box'");
193 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(2).item(0).getStringValue()", "'padding-box'");
194 shouldBe("checkComputedStyleValue()", "true");
195
196 e.style.background = "border-box padding-box url(dummy://test.png) green 45% / contain repeat fixed";
197 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(0, 128, 0) url(dummy://test.png) repeat fixed 45% 50% / contain border-box padding-box'");
198 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'");
199 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(0, 128, 0) url(dummy://test.png) repeat fixed 45% 50% / contain border-box padding-box'");
200 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2");
201 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5");
202 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3");
203 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
204 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "128");
205 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
206 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).item(0).getStringValue()", "'dummy://test.png'");
207 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).item(0).getStringValue()", "'repeat'");
208 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).item(0).getStringValue()", "'fixed'");
209 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).toString()", "'[object CSSValueList]'");
210 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(0).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "45");
211 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(4).item(0).item(1).getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "50");
212 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(0).item(0).getStringValue()", "'contain'");
213 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(1).item(0).getStringValue()", "'border-box'");
214 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).item(2).item(0).getStringValue()", "'padding-box'");
215 shouldBe("checkComputedStyleValue()", "true");
216
217 document.body.removeChild(testContainer);
218
219 </script>
220 </body>
221 </html>