1 Tests that InspectorCSSAgent API methods work as expected.
6 === Computed style property count for body ===
9 === Matched rules for body ===
13 ['display':'block'] @[undefined-undefined] style
14 ['margin-top':'8px'] @[undefined-undefined] style
15 ['margin-right':'8px'] @[undefined-undefined] style
16 ['margin-bottom':'8px'] @[undefined-undefined] style
17 ['margin-left':'8px'] @[undefined-undefined] style
21 ['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
25 ['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
29 ['font-size':'12px'] @[5-21] active
32 important /* !important property not recognized by WebCore */' is-important non-parsed] @[26-104] active
33 ['height':'100% !important' is-important] @[109-133] active
34 ['colorz':'"!important"' non-parsed] @[138-159] active
35 ['important':'!important' non-parsed] @[164-185] active
36 ['color':'yellow'] @[190-204] active
37 ['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[209-278] active
41 ['color':'#F00BAA'] @[13-28] active
42 ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[28-81] active
46 ['background':'green /* value !important comment */ !important /* no semicolon, very !important */' is-important] @[0-95] active
47 ['background-image':'initial' is-important] @[undefined-undefined] style
48 ['background-repeat-x':'initial' is-important] @[undefined-undefined] style
49 ['background-repeat-y':'initial' is-important] @[undefined-undefined] style
50 ['background-attachment':'initial' is-important] @[undefined-undefined] style
51 ['background-position-x':'initial' is-important] @[undefined-undefined] style
52 ['background-position-y':'initial' is-important] @[undefined-undefined] style
53 ['background-origin':'initial' is-important] @[undefined-undefined] style
54 ['background-clip':'initial' is-important] @[undefined-undefined] style
55 ['background-color':'green' is-important] @[undefined-undefined] style
56 ['background-size':'initial' is-important] @[undefined-undefined] style
59 body.mainpage: [regular]
60 ['text-decoration':'none'] @[5-27] active
61 ['badproperty':'1badvalue1' non-parsed] @[108-132] active
64 body.mainpage: [regular]
65 ['prop1':'val1' non-parsed] @[5-17] active
66 ['prop2':'val2' non-parsed] @[22-34] active
68 === Pseudo rules for body ===
72 body::after: [regular]
73 ['content':'"After body"'] @[5-27] active
75 === Inherited styles for body ===
80 ['display':'block'] @[undefined-undefined] style
84 ['font-weight':'400'] @[5-22] active
86 === Inline style for body ===
90 ['font-weight':'normal'] @[0-20] active
91 ['width':'85%'] @[21-32] active
92 ['background-image':'url(bar.png)'] @[33-63] active
94 === Attributes style for table ===
98 ['width':'50%'] @[undefined-undefined] style
100 === All stylesheets ===
102 StyleSheet: '@import url("styles-new-API-1.css");
113 important /* !important property not recognized by WebCore */;
114 height: 100% !important;
115 colorz: "!important";
116 important:!important;
118 color: "badcolor" ! important /* good property with strange value */;
121 /* comment before selector */body.main1/* comment after selector */{/* comment */color: #F00BAA;zoo:moo /* not an !important unrecognized property */}/* comment */
123 body.main2{background: green /* value !important comment */ !important /* no semicolon, very !important */}
127 content: "After body";
131 height : 100% ; border: 1px solid; border-width: 2px; background-color : #33FF33; googles: abra; foo: .bar; -moz-goog: 1***; border-width: 0px;
137 ['font-weight':'400'] @[5-22] active
141 ['font-size':'12px'] @[5-21] active
144 important /* !important property not recognized by WebCore */' is-important non-parsed] @[26-104] active
145 ['height':'100% !important' is-important] @[109-133] active
146 ['colorz':'"!important"' non-parsed] @[138-159] active
147 ['important':'!important' non-parsed] @[164-185] active
148 ['color':'yellow'] @[190-204] active
149 ['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[209-278] active
152 body.main1: [regular]
153 ['color':'#F00BAA'] @[13-28] active
154 ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[28-81] active
157 body.main2: [regular]
158 ['background':'green /* value !important comment */ !important /* no semicolon, very !important */' is-important] @[0-95] active
159 ['background-image':'initial' is-important] @[undefined-undefined] style
160 ['background-repeat-x':'initial' is-important] @[undefined-undefined] style
161 ['background-repeat-y':'initial' is-important] @[undefined-undefined] style
162 ['background-attachment':'initial' is-important] @[undefined-undefined] style
163 ['background-position-x':'initial' is-important] @[undefined-undefined] style
164 ['background-position-y':'initial' is-important] @[undefined-undefined] style
165 ['background-origin':'initial' is-important] @[undefined-undefined] style
166 ['background-clip':'initial' is-important] @[undefined-undefined] style
167 ['background-color':'green' is-important] @[undefined-undefined] style
168 ['background-size':'initial' is-important] @[undefined-undefined] style
171 body::after: [regular]
172 ['content':'"After body"'] @[5-27] active
176 ['height':'100%'] @[5-20] active
177 ['border':'1px solid'] @[21-39] active
178 ['border-width':'2px'] @[40-58] inactive
179 ['background-color':'#33FF33'] @[59-86] active
180 ['googles':'abra' non-parsed] @[87-101] active
181 ['foo':'.bar' non-parsed] @[102-112] active
182 ['-moz-goog':'1***' non-parsed] @[113-129] active
183 ['border-width':'0px'] @[130-148] active
184 ['border-top-style':'solid'] @[undefined-undefined] style
185 ['border-right-style':'solid'] @[undefined-undefined] style
186 ['border-bottom-style':'solid'] @[undefined-undefined] style
187 ['border-left-style':'solid'] @[undefined-undefined] style
188 ['border-top-color':'initial'] @[undefined-undefined] style
189 ['border-right-color':'initial'] @[undefined-undefined] style
190 ['border-bottom-color':'initial'] @[undefined-undefined] style
191 ['border-left-color':'initial'] @[undefined-undefined] style
192 ['border-image':'initial'] @[undefined-undefined] style
193 ['border-top-width':'0px'] @[undefined-undefined] style
194 ['border-right-width':'0px'] @[undefined-undefined] style
195 ['border-bottom-width':'0px'] @[undefined-undefined] style
196 ['border-left-width':'0px'] @[undefined-undefined] style
198 StyleSheet: '@import url(styles-new-API-2.css);
200 @page { margin: 2cm } /* All margins set to 2cm */
203 margin-top: 10cm /* Top margin on first page 10cm */
212 font-family: 'TheFont';
213 src: url('font.url');
219 property: imported-media-screen-stylesheet;
226 #absent-id: [regular]
230 ['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
232 StyleSheet: '@import url(styles-new-API-1.css);
234 @page { margin: 2cm } /* All margins set to 2cm */
237 margin-top: 10cm /* Top margin on first page 10cm */
246 font-family: 'TheFont';
247 src: url('font.url');
253 property: imported-media-screen-stylesheet;
260 #absent-id: [regular]
264 ['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
268 /* An inline stylesheet */
270 text-decoration: none; /* at least one valid property is necessary for WebCore to match a rule */
271 ;badproperty: 1badvalue1;
282 body.mainpage: [regular]
283 ['text-decoration':'none'] @[5-27] active
284 ['badproperty':'1badvalue1' non-parsed] @[108-132] active
287 body.mainpage: [regular]
288 ['prop1':'val1' non-parsed] @[5-17] active
289 ['prop2':'val2' non-parsed] @[22-34] active
291 === Last stylesheet patched ===
293 StyleSheet: 'body.mainpage { text-decoration: strikethrough; badproperty: 2badvalue2;}body { text-align: justify;}'
296 body.mainpage: [regular]
297 ['text-decoration':'strikethrough' non-parsed] @[4-35] active
298 ['badproperty':'2badvalue2' non-parsed] @[39-63] active
302 ['text-align':'justify'] @[4-24] active
304 === After selector set ===
306 StyleSheet: 'html *, body[foo="bar"] { text-decoration: strikethrough; badproperty: 2badvalue2;}body { text-align: justify;}'
309 html *, body[foo="bar"]: [regular]
310 ['text-decoration':'strikethrough' non-parsed] @[4-35] active
311 ['badproperty':'2badvalue2' non-parsed] @[39-63] active
315 ['text-align':'justify'] @[4-24] active
317 === After style text set ===
319 StyleSheet: 'html *, body[foo="bar"] {
320 color: white; background: black;
321 }body { text-align: justify;}'
324 html *, body[foo="bar"]: [regular]
325 ['color':'white'] @[5-18] active
326 ['background':'black'] @[19-37] active
327 ['background-image':'initial'] @[undefined-undefined] style
328 ['background-repeat-x':'initial'] @[undefined-undefined] style
329 ['background-repeat-y':'initial'] @[undefined-undefined] style
330 ['background-attachment':'initial'] @[undefined-undefined] style
331 ['background-position-x':'initial'] @[undefined-undefined] style
332 ['background-position-y':'initial'] @[undefined-undefined] style
333 ['background-origin':'initial'] @[undefined-undefined] style
334 ['background-clip':'initial'] @[undefined-undefined] style
335 ['background-color':'black'] @[undefined-undefined] style
336 ['background-size':'initial'] @[undefined-undefined] style
340 ['text-align':'justify'] @[4-24] active
342 === Matched rules after rule added ===
346 ['display':'block'] @[undefined-undefined] style
347 ['margin-top':'8px'] @[undefined-undefined] style
348 ['margin-right':'8px'] @[undefined-undefined] style
349 ['margin-bottom':'8px'] @[undefined-undefined] style
350 ['margin-left':'8px'] @[undefined-undefined] style
354 ['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
358 ['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
362 ['font-size':'12px'] @[5-21] active
365 important /* !important property not recognized by WebCore */' is-important non-parsed] @[26-104] active
366 ['height':'100% !important' is-important] @[109-133] active
367 ['colorz':'"!important"' non-parsed] @[138-159] active
368 ['important':'!important' non-parsed] @[164-185] active
369 ['color':'yellow'] @[190-204] active
370 ['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[209-278] active
373 html *, body[foo="bar"]: [regular]
374 ['color':'white'] @[5-18] active
375 ['background':'black'] @[19-37] active
376 ['background-image':'initial'] @[undefined-undefined] style
377 ['background-repeat-x':'initial'] @[undefined-undefined] style
378 ['background-repeat-y':'initial'] @[undefined-undefined] style
379 ['background-attachment':'initial'] @[undefined-undefined] style
380 ['background-position-x':'initial'] @[undefined-undefined] style
381 ['background-position-y':'initial'] @[undefined-undefined] style
382 ['background-origin':'initial'] @[undefined-undefined] style
383 ['background-clip':'initial'] @[undefined-undefined] style
384 ['background-color':'black'] @[undefined-undefined] style
385 ['background-size':'initial'] @[undefined-undefined] style
389 ['text-align':'justify'] @[4-24] active
393 ['font-family':'serif'] @[5-24] active
396 body.main1: [regular]
397 ['color':'#F00BAA'] @[13-28] active
398 ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[28-81] active
401 body.main2: [regular]
402 ['background':'green /* value !important comment */ !important /* no semicolon, very !important */' is-important] @[0-95] active
403 ['background-image':'initial' is-important] @[undefined-undefined] style
404 ['background-repeat-x':'initial' is-important] @[undefined-undefined] style
405 ['background-repeat-y':'initial' is-important] @[undefined-undefined] style
406 ['background-attachment':'initial' is-important] @[undefined-undefined] style
407 ['background-position-x':'initial' is-important] @[undefined-undefined] style
408 ['background-position-y':'initial' is-important] @[undefined-undefined] style
409 ['background-origin':'initial' is-important] @[undefined-undefined] style
410 ['background-clip':'initial' is-important] @[undefined-undefined] style
411 ['background-color':'green' is-important] @[undefined-undefined] style
412 ['background-size':'initial' is-important] @[undefined-undefined] style
414 === After property manipulations ===
418 [text='height : 100% ;'] disabled
419 ['border':'1px solid'] @[1-19] active
420 ['border-width':'2px'] @[20-38] inactive
421 ['googles':'abra' non-parsed] @[40-54] active
422 ['foo':'.bar' non-parsed] @[55-65] active
423 ['-moz-goog':'1***' non-parsed] @[66-82] active
424 ['font-size':'12px'] @[88-104] active
425 ['border-width':'1px'] @[109-127] active
426 [text='font-size: 14px;'] disabled
427 ['border-top-width':'1px'] @[undefined-undefined] style
428 ['border-right-width':'1px'] @[undefined-undefined] style
429 ['border-bottom-width':'1px'] @[undefined-undefined] style
430 ['border-left-width':'1px'] @[undefined-undefined] style
431 ['border-top-style':'solid'] @[undefined-undefined] style
432 ['border-right-style':'solid'] @[undefined-undefined] style
433 ['border-bottom-style':'solid'] @[undefined-undefined] style
434 ['border-left-style':'solid'] @[undefined-undefined] style
435 ['border-top-color':'initial'] @[undefined-undefined] style
436 ['border-right-color':'initial'] @[undefined-undefined] style
437 ['border-bottom-color':'initial'] @[undefined-undefined] style
438 ['border-left-color':'initial'] @[undefined-undefined] style
439 ['border-image':'initial'] @[undefined-undefined] style
441 === After property enabled ===
445 [text='height : 100% ;'] disabled
446 ['border':'1px solid'] @[1-19] active
447 ['border-width':'2px'] @[20-38] inactive
448 ['googles':'abra' non-parsed] @[40-54] active
449 ['foo':'.bar' non-parsed] @[55-65] active
450 ['-moz-goog':'1***' non-parsed] @[66-82] active
451 ['font-size':'12px'] @[88-104] inactive
452 ['border-width':'1px'] @[109-127] active
453 ['font-size':'14px'] @[132-148] active
454 ['border-top-width':'1px'] @[undefined-undefined] style
455 ['border-right-width':'1px'] @[undefined-undefined] style
456 ['border-bottom-width':'1px'] @[undefined-undefined] style
457 ['border-left-width':'1px'] @[undefined-undefined] style
458 ['border-top-style':'solid'] @[undefined-undefined] style
459 ['border-right-style':'solid'] @[undefined-undefined] style
460 ['border-bottom-style':'solid'] @[undefined-undefined] style
461 ['border-left-style':'solid'] @[undefined-undefined] style
462 ['border-top-color':'initial'] @[undefined-undefined] style
463 ['border-right-color':'initial'] @[undefined-undefined] style
464 ['border-bottom-color':'initial'] @[undefined-undefined] style
465 ['border-left-color':'initial'] @[undefined-undefined] style
466 ['border-image':'initial'] @[undefined-undefined] style