1 Tests that InspectorCSSAgent API methods work as expected.
8 === Computed style property count for body ===
11 === 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
19 body: [regular, 20:0-20:4] {
20 ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] active
22 body: [regular, 20:0-20:4] {
23 ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] active
25 body: [regular, 9:0-9:4] {
26 ['font-size':'12px'] @[10:4-10:20] active
29 important /* !important property not recognized by WebCore */' is-important non-parsed] @[11:4-13:66] active
30 ['height':'100% !important' is-important] @[14:4-14:28] active
31 ['colorz':'"!important"' non-parsed] @[15:4-15:25] active
32 ['important':'!important' non-parsed] @[16:4-16:25] active
33 ['color':'yellow'] @[17:4-17:18] active
34 ['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[18:4-18:73] active
36 body.main1: [regular, 21:29-21:67] {
37 ['color':'#F00BAA'] @[21:81-21:96] active
38 ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[21:96-21:149] active
40 body.main2: [regular, 23:0-23:10] {
41 ['background':'green /* value !important comment */ !important /* no semicolon, very !important */' is-important] @[23:11-23:106] active
42 ['background-image':'initial' is-important] @[undefined-undefined] style
43 ['background-repeat-x':'initial' is-important] @[undefined-undefined] style
44 ['background-repeat-y':'initial' is-important] @[undefined-undefined] style
45 ['background-attachment':'initial' is-important] @[undefined-undefined] style
46 ['background-position-x':'initial' is-important] @[undefined-undefined] style
47 ['background-position-y':'initial' is-important] @[undefined-undefined] style
48 ['background-origin':'initial' is-important] @[undefined-undefined] style
49 ['background-clip':'initial' is-important] @[undefined-undefined] style
50 ['background-color':'green' is-important] @[undefined-undefined] style
51 ['background-size':'initial' is-important] @[undefined-undefined] style
53 body.mainpage: [regular, 3:0-3:13] {
54 ['text-decoration':'none'] @[4:4-4:26] active
55 ['badproperty':'1badvalue1' non-parsed] @[5:5-5:29] active
56 ['text-decoration-line':'none'] @[undefined-undefined] style
57 ['text-decoration-style':'initial'] @[undefined-undefined] style
58 ['text-decoration-color':'initial'] @[undefined-undefined] style
60 body.mainpage: [regular, 8:0-8:13] {
61 ['prop1':'val1' non-parsed] @[9:4-9:16] active
62 ['prop2':'val2' non-parsed] @[10:4-10:16] active
65 === Pseudo rules for body ===
67 body::after: [regular, 26:0-26:11] {
68 ['content':'"After body"'] @[27:4-27:26] active
71 === Inherited styles for body ===
75 ['display':'block'] @[undefined-undefined] style
77 html: [regular, 4:0-4:4] {
78 ['font-weight':'400'] @[5:4-5:21] active
81 === Inline style for body ===
82 ['font-weight':'normal'] @[0:0-0:20] active
83 ['width':'85%'] @[0:21-0:32] active
84 ['background-image':'url(bar.png)'] @[0:33-0:63] active
86 Running: test_forcedState
87 === BODY with forced :hover ===
89 ['display':'block'] @[undefined-undefined] style
90 ['margin-top':'8px'] @[undefined-undefined] style
91 ['margin-right':'8px'] @[undefined-undefined] style
92 ['margin-bottom':'8px'] @[undefined-undefined] style
93 ['margin-left':'8px'] @[undefined-undefined] style
95 body: [regular, 20:0-20:4] {
96 ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] active
98 body: [regular, 20:0-20:4] {
99 ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] active
101 body: [regular, 9:0-9:4] {
102 ['font-size':'12px'] @[10:4-10:20] active
105 important /* !important property not recognized by WebCore */' is-important non-parsed] @[11:4-13:66] active
106 ['height':'100% !important' is-important] @[14:4-14:28] active
107 ['colorz':'"!important"' non-parsed] @[15:4-15:25] active
108 ['important':'!important' non-parsed] @[16:4-16:25] active
109 ['color':'yellow'] @[17:4-17:18] active
110 ['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[18:4-18:73] active
112 body.main1: [regular, 21:29-21:67] {
113 ['color':'#F00BAA'] @[21:81-21:96] active
114 ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[21:96-21:149] active
116 body.main2: [regular, 23:0-23:10] {
117 ['background':'green /* value !important comment */ !important /* no semicolon, very !important */' is-important] @[23:11-23:106] active
118 ['background-image':'initial' is-important] @[undefined-undefined] style
119 ['background-repeat-x':'initial' is-important] @[undefined-undefined] style
120 ['background-repeat-y':'initial' is-important] @[undefined-undefined] style
121 ['background-attachment':'initial' is-important] @[undefined-undefined] style
122 ['background-position-x':'initial' is-important] @[undefined-undefined] style
123 ['background-position-y':'initial' is-important] @[undefined-undefined] style
124 ['background-origin':'initial' is-important] @[undefined-undefined] style
125 ['background-clip':'initial' is-important] @[undefined-undefined] style
126 ['background-color':'green' is-important] @[undefined-undefined] style
127 ['background-size':'initial' is-important] @[undefined-undefined] style
129 body.mainpage: [regular, 3:0-3:13] {
130 ['text-decoration':'none'] @[4:4-4:26] active
131 ['badproperty':'1badvalue1' non-parsed] @[5:5-5:29] active
132 ['text-decoration-line':'none'] @[undefined-undefined] style
133 ['text-decoration-style':'initial'] @[undefined-undefined] style
134 ['text-decoration-color':'initial'] @[undefined-undefined] style
136 body.mainpage: [regular, 8:0-8:13] {
137 ['prop1':'val1' non-parsed] @[9:4-9:16] active
138 ['prop2':'val2' non-parsed] @[10:4-10:16] active
140 body:hover: [regular, 13:0-13:10] {
141 ['color':'#CDE'] @[14:2-14:14] active
144 Running: test_textNodeComputedStyles
146 === Computed style property count for TextNode ===
149 Running: test_tableStyles
151 === Attributes style for table ===
152 ['width':'50%'] @[undefined-undefined] style
154 === Stylesheet-for-inline-style text ===
157 === Stylesheet-for-inline-style modification result ===
160 Running: test_styleSheets
162 === All stylesheets ===
164 StyleSheet: '@import url(styles-new-API-2.css);
166 @page { margin: 2cm } /* All margins set to 2cm */
169 margin-top: 10cm /* Top margin on first page 10cm */
178 font-family: 'TheFont';
179 src: url('font.url');
185 property: imported-media-screen-stylesheet;
190 #absent-id: [regular, 10:0-10:10] {
192 body: [regular, 20:0-20:4] {
193 ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] active
196 StyleSheet: '@import url(styles-new-API-1.css);
198 @page { margin: 2cm } /* All margins set to 2cm */
201 margin-top: 10cm /* Top margin on first page 10cm */
210 font-family: 'TheFont';
211 src: url('font.url');
217 property: imported-media-screen-stylesheet;
222 #absent-id: [regular, 10:0-10:10] {
224 body: [regular, 20:0-20:4] {
225 ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] active
228 StyleSheet: '@charset "UTF-8";
230 @import url("styles-new-API-1.css");
241 important /* !important property not recognized by WebCore */;
242 height: 100% !important;
243 colorz: "!important";
244 important:!important;
246 color: "badcolor" ! important /* good property with strange value */;
249 /* comment before selector */body.main1/* comment after selector */{/* comment */color: #F00BAA;zoo:moo /* not an !important unrecognized property */}/* comment */
251 body.main2{background: green /* value !important comment */ !important /* no semicolon, very !important */}
255 content: "After body";
259 height : 100% ; border: 1px solid; border-width: 2px; background-color : #33FF33; googles: abra; foo: .bar; -moz-goog: 1***; border-width: 0px; /*padding-top:1px;*/
262 html: [regular, 4:0-4:4] {
263 ['font-weight':'400'] @[5:4-5:21] active
265 body: [regular, 9:0-9:4] {
266 ['font-size':'12px'] @[10:4-10:20] active
269 important /* !important property not recognized by WebCore */' is-important non-parsed] @[11:4-13:66] active
270 ['height':'100% !important' is-important] @[14:4-14:28] active
271 ['colorz':'"!important"' non-parsed] @[15:4-15:25] active
272 ['important':'!important' non-parsed] @[16:4-16:25] active
273 ['color':'yellow'] @[17:4-17:18] active
274 ['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[18:4-18:73] active
276 body.main1: [regular, 21:29-21:67] {
277 ['color':'#F00BAA'] @[21:81-21:96] active
278 ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[21:96-21:149] active
280 body.main2: [regular, 23:0-23:10] {
281 ['background':'green /* value !important comment */ !important /* no semicolon, very !important */' is-important] @[23:11-23:106] active
282 ['background-image':'initial' is-important] @[undefined-undefined] style
283 ['background-repeat-x':'initial' is-important] @[undefined-undefined] style
284 ['background-repeat-y':'initial' is-important] @[undefined-undefined] style
285 ['background-attachment':'initial' is-important] @[undefined-undefined] style
286 ['background-position-x':'initial' is-important] @[undefined-undefined] style
287 ['background-position-y':'initial' is-important] @[undefined-undefined] style
288 ['background-origin':'initial' is-important] @[undefined-undefined] style
289 ['background-clip':'initial' is-important] @[undefined-undefined] style
290 ['background-color':'green' is-important] @[undefined-undefined] style
291 ['background-size':'initial' is-important] @[undefined-undefined] style
293 body::after: [regular, 26:0-26:11] {
294 ['content':'"After body"'] @[27:4-27:26] active
296 h1: [regular, 30:0-30:2] {
297 ['height':'100%'] @[31:4-31:19] active
298 ['border':'1px solid'] @[31:20-31:38] active
299 ['border-width':'2px'] @[31:39-31:57] inactive
300 ['background-color':'#33FF33'] @[31:58-31:85] active
301 ['googles':'abra' non-parsed] @[31:86-31:100] active
302 ['foo':'.bar' non-parsed] @[31:101-31:111] active
303 ['-moz-goog':'1***' non-parsed] @[31:112-31:128] active
304 ['border-width':'0px'] @[31:129-31:147] active
305 [text='/*padding-top:1px;*/'] disabled
306 ['border-top-style':'solid'] @[undefined-undefined] style
307 ['border-right-style':'solid'] @[undefined-undefined] style
308 ['border-bottom-style':'solid'] @[undefined-undefined] style
309 ['border-left-style':'solid'] @[undefined-undefined] style
310 ['border-top-color':'initial'] @[undefined-undefined] style
311 ['border-right-color':'initial'] @[undefined-undefined] style
312 ['border-bottom-color':'initial'] @[undefined-undefined] style
313 ['border-left-color':'initial'] @[undefined-undefined] style
314 ['border-image-source':'initial'] @[undefined-undefined] style
315 ['border-image-slice':'initial'] @[undefined-undefined] style
316 ['border-image-width':'initial'] @[undefined-undefined] style
317 ['border-image-outset':'initial'] @[undefined-undefined] style
318 ['border-image-repeat':'initial'] @[undefined-undefined] style
319 ['border-top-width':'0px'] @[undefined-undefined] style
320 ['border-right-width':'0px'] @[undefined-undefined] style
321 ['border-bottom-width':'0px'] @[undefined-undefined] style
322 ['border-left-width':'0px'] @[undefined-undefined] style
327 /* An inline stylesheet */
329 text-decoration: none; /* at least one valid property is necessary for WebCore to match a rule */
330 ;badproperty: 1badvalue1;
342 body.mainpage: [regular, 3:0-3:13] {
343 ['text-decoration':'none'] @[4:4-4:26] active
344 ['badproperty':'1badvalue1' non-parsed] @[5:5-5:29] active
345 ['text-decoration-line':'none'] @[undefined-undefined] style
346 ['text-decoration-style':'initial'] @[undefined-undefined] style
347 ['text-decoration-color':'initial'] @[undefined-undefined] style
349 body.mainpage: [regular, 8:0-8:13] {
350 ['prop1':'val1' non-parsed] @[9:4-9:16] active
351 ['prop2':'val2' non-parsed] @[10:4-10:16] active
353 body:hover: [regular, 13:0-13:10] {
354 ['color':'#CDE'] @[14:2-14:14] active
357 === Last stylesheet patched ===
359 StyleSheet: 'body.mainpage { text-decoration: strikethrough; badproperty: 2badvalue2;}body { text-align: justify;}'
360 body.mainpage: [regular, 0:0-0:13] {
361 ['text-decoration':'strikethrough' non-parsed] @[0:19-0:50] active
362 ['badproperty':'2badvalue2' non-parsed] @[0:54-0:78] active
364 body: [regular, 0:79-0:83] {
365 ['text-align':'justify'] @[0:89-0:109] active
368 === After selector set ===
370 StyleSheet: 'html *, body[foo="bar"] { text-decoration: strikethrough; badproperty: 2badvalue2;}body { text-align: justify;}'
371 html *, body[foo="bar"]: [regular, 0:0-0:6; 0:8-0:23] {
372 ['text-decoration':'strikethrough' non-parsed] @[0:29-0:60] active
373 ['badproperty':'2badvalue2' non-parsed] @[0:64-0:88] active
375 body: [regular, 0:89-0:93] {
376 ['text-align':'justify'] @[0:99-0:119] active
379 === After style text set ===
381 StyleSheet: 'html *, body[foo="bar"] {
382 color: white; background: black;
383 }body { text-align: justify;}'
384 html *, body[foo="bar"]: [regular, 0:0-0:6; 0:8-0:23] {
385 ['color':'white'] @[1:4-1:17] active
386 ['background':'black'] @[1:18-1:36] active
387 ['background-image':'initial'] @[undefined-undefined] style
388 ['background-repeat-x':'initial'] @[undefined-undefined] style
389 ['background-repeat-y':'initial'] @[undefined-undefined] style
390 ['background-attachment':'initial'] @[undefined-undefined] style
391 ['background-position-x':'initial'] @[undefined-undefined] style
392 ['background-position-y':'initial'] @[undefined-undefined] style
393 ['background-origin':'initial'] @[undefined-undefined] style
394 ['background-clip':'initial'] @[undefined-undefined] style
395 ['background-color':'black'] @[undefined-undefined] style
396 ['background-size':'initial'] @[undefined-undefined] style
398 body: [regular, 2:1-2:5] {
399 ['text-align':'justify'] @[2:11-2:31] active
402 Running: test_addRule
404 === Matched rules after rule added ===
406 ['display':'block'] @[undefined-undefined] style
407 ['margin-top':'8px'] @[undefined-undefined] style
408 ['margin-right':'8px'] @[undefined-undefined] style
409 ['margin-bottom':'8px'] @[undefined-undefined] style
410 ['margin-left':'8px'] @[undefined-undefined] style
412 body: [regular, 20:0-20:4] {
413 ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] active
415 body: [regular, 20:0-20:4] {
416 ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] active
418 body: [regular, 9:0-9:4] {
419 ['font-size':'12px'] @[10:4-10:20] active
422 important /* !important property not recognized by WebCore */' is-important non-parsed] @[11:4-13:66] active
423 ['height':'100% !important' is-important] @[14:4-14:28] active
424 ['colorz':'"!important"' non-parsed] @[15:4-15:25] active
425 ['important':'!important' non-parsed] @[16:4-16:25] active
426 ['color':'yellow'] @[17:4-17:18] active
427 ['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[18:4-18:73] active
429 html *, body[foo="bar"]: [regular, 0:0-0:6; 0:8-0:23] {
430 ['color':'white'] @[1:4-1:17] active
431 ['background':'black'] @[1:18-1:36] active
432 ['background-image':'initial'] @[undefined-undefined] style
433 ['background-repeat-x':'initial'] @[undefined-undefined] style
434 ['background-repeat-y':'initial'] @[undefined-undefined] style
435 ['background-attachment':'initial'] @[undefined-undefined] style
436 ['background-position-x':'initial'] @[undefined-undefined] style
437 ['background-position-y':'initial'] @[undefined-undefined] style
438 ['background-origin':'initial'] @[undefined-undefined] style
439 ['background-clip':'initial'] @[undefined-undefined] style
440 ['background-color':'black'] @[undefined-undefined] style
441 ['background-size':'initial'] @[undefined-undefined] style
443 body: [regular, 2:1-2:5] {
444 ['text-align':'justify'] @[2:11-2:31] active
446 body: [inspector, 0:0-0:4] {
447 ['font-family':'serif'] @[1:4-1:23] active
449 body.main1: [regular, 21:29-21:67] {
450 ['color':'#F00BAA'] @[21:81-21:96] active
451 ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[21:96-21:149] active
453 body.main2: [regular, 23:0-23:10] {
454 ['background':'green /* value !important comment */ !important /* no semicolon, very !important */' is-important] @[23:11-23:106] active
455 ['background-image':'initial' is-important] @[undefined-undefined] style
456 ['background-repeat-x':'initial' is-important] @[undefined-undefined] style
457 ['background-repeat-y':'initial' is-important] @[undefined-undefined] style
458 ['background-attachment':'initial' is-important] @[undefined-undefined] style
459 ['background-position-x':'initial' is-important] @[undefined-undefined] style
460 ['background-position-y':'initial' is-important] @[undefined-undefined] style
461 ['background-origin':'initial' is-important] @[undefined-undefined] style
462 ['background-clip':'initial' is-important] @[undefined-undefined] style
463 ['background-color':'green' is-important] @[undefined-undefined] style
464 ['background-size':'initial' is-important] @[undefined-undefined] style
467 Running: test_disableProperty
469 === After property manipulations ===
470 [text='/* height : 100% ; */'] disabled
471 ['border':'1px solid'] @[31:26-31:44] active
472 ['border-width':'2px'] @[31:45-31:63] inactive
473 ['googles':'abra' non-parsed] @[31:65-31:79] active
474 ['foo':'.bar' non-parsed] @[31:80-31:90] active
475 ['-moz-goog':'1***' non-parsed] @[31:91-31:107] active
476 ['font-size':'12px'] @[32:4-32:20] active
477 ['border-width':'1px'] @[33:4-33:22] active
478 [text='/* font-size: 14px; */'] disabled
479 ['padding-top':'1px'] @[35:4-35:20] active
480 ['border-top-width':'1px'] @[undefined-undefined] style
481 ['border-right-width':'1px'] @[undefined-undefined] style
482 ['border-bottom-width':'1px'] @[undefined-undefined] style
483 ['border-left-width':'1px'] @[undefined-undefined] style
484 ['border-top-style':'solid'] @[undefined-undefined] style
485 ['border-right-style':'solid'] @[undefined-undefined] style
486 ['border-bottom-style':'solid'] @[undefined-undefined] style
487 ['border-left-style':'solid'] @[undefined-undefined] style
488 ['border-top-color':'initial'] @[undefined-undefined] style
489 ['border-right-color':'initial'] @[undefined-undefined] style
490 ['border-bottom-color':'initial'] @[undefined-undefined] style
491 ['border-left-color':'initial'] @[undefined-undefined] style
492 ['border-image-source':'initial'] @[undefined-undefined] style
493 ['border-image-slice':'initial'] @[undefined-undefined] style
494 ['border-image-width':'initial'] @[undefined-undefined] style
495 ['border-image-outset':'initial'] @[undefined-undefined] style
496 ['border-image-repeat':'initial'] @[undefined-undefined] style
498 === After property enabled ===
499 [text='/* height : 100% ; */'] disabled
500 ['border':'1px solid'] @[31:26-31:44] active
501 ['border-width':'2px'] @[31:45-31:63] inactive
502 ['googles':'abra' non-parsed] @[31:65-31:79] active
503 ['foo':'.bar' non-parsed] @[31:80-31:90] active
504 ['-moz-goog':'1***' non-parsed] @[31:91-31:107] active
505 ['font-size':'12px'] @[32:4-32:20] inactive
506 ['border-width':'1px'] @[33:4-33:22] active
507 ['font-size':'14px'] @[34:4-34:20] active
508 ['padding-top':'1px'] @[35:4-35:20] active
509 ['border-top-width':'1px'] @[undefined-undefined] style
510 ['border-right-width':'1px'] @[undefined-undefined] style
511 ['border-bottom-width':'1px'] @[undefined-undefined] style
512 ['border-left-width':'1px'] @[undefined-undefined] style
513 ['border-top-style':'solid'] @[undefined-undefined] style
514 ['border-right-style':'solid'] @[undefined-undefined] style
515 ['border-bottom-style':'solid'] @[undefined-undefined] style
516 ['border-left-style':'solid'] @[undefined-undefined] style
517 ['border-top-color':'initial'] @[undefined-undefined] style
518 ['border-right-color':'initial'] @[undefined-undefined] style
519 ['border-bottom-color':'initial'] @[undefined-undefined] style
520 ['border-left-color':'initial'] @[undefined-undefined] style
521 ['border-image-source':'initial'] @[undefined-undefined] style
522 ['border-image-slice':'initial'] @[undefined-undefined] style
523 ['border-image-width':'initial'] @[undefined-undefined] style
524 ['border-image-outset':'initial'] @[undefined-undefined] style
525 ['border-image-repeat':'initial'] @[undefined-undefined] style