Tests that InspectorCSSAgent API methods work as expected. Running: test_styles === Computed style property count for body === OK === Matched rules for body === body: [user-agent] { ['display':'block'] @[undefined-undefined] ['margin-top':'8px'] @[undefined-undefined] ['margin-right':'8px'] @[undefined-undefined] ['margin-bottom':'8px'] @[undefined-undefined] ['margin-left':'8px'] @[undefined-undefined] } body: [regular, 20:0-20:4] { ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] } body: [regular, 20:0-20:4] { ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] } body: [regular, 9:0-9:4] { ['font-size':'12px'] @[10:4-10:20] ['foo':'bar ! important /* !important property not recognized by WebCore */' is-important non-parsed] @[11:4-13:66] ['height':'100% !important' is-important] @[14:4-14:28] ['colorz':'"!important"' non-parsed] @[15:4-15:25] ['important':'!important' is-important non-parsed] @[16:4-16:25] ['color':'yellow'] @[17:4-17:18] ['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[18:4-18:73] ['font-size':'12px'] @[undefined-undefined] ['color':'yellow'] @[undefined-undefined] ['height':'100% !important' is-important] @[undefined-undefined] } body.main1: [regular, 21:29-21:67] { ['color':'#F00BAA'] @[21:81-21:96] ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[21:96-21:149] ['color':'rgb(240, 11, 170)'] @[undefined-undefined] } body.main2: [regular, 23:0-23:10] { ['background':'green /* value !important comment */ !important /* no semicolon, very !important */' is-important] @[23:11-23:106] ['background-image':'initial !important' is-important] @[undefined-undefined] ['background-position-x':'initial !important' is-important] @[undefined-undefined] ['background-position-y':'initial !important' is-important] @[undefined-undefined] ['background-size':'initial !important' is-important] @[undefined-undefined] ['background-repeat':'initial !important' is-important] @[undefined-undefined] ['background-attachment':'initial !important' is-important] @[undefined-undefined] ['background-origin':'initial !important' is-important] @[undefined-undefined] ['background-clip':'initial !important' is-important] @[undefined-undefined] ['background-color':'green !important' is-important] @[undefined-undefined] } body.mainpage: [regular, 3:0-3:13] { ['text-decoration':'none'] @[4:4-4:26] ['badproperty':'1badvalue1' non-parsed] @[5:5-5:29] ['text-decoration-line':'none'] @[undefined-undefined] ['text-decoration-thickness':'initial'] @[undefined-undefined] ['text-decoration-style':'initial'] @[undefined-undefined] ['text-decoration-color':'initial'] @[undefined-undefined] } body.mainpage: [regular, 8:0-8:13] { ['prop1':'val1' non-parsed] @[9:4-9:16] ['prop2':'val2' non-parsed] @[10:4-10:16] } === Pseudo rules for body === PseudoType=after body::after: [regular, 26:0-26:11] { ['content':'"After body"'] @[27:4-27:26] ['content':'"After body"'] @[undefined-undefined] } === Inherited styles for body === Level=1 [NO STYLE] html: [user-agent] { ['display':'block'] @[undefined-undefined] } :root: [user-agent] { ['view-transition-name':'root'] @[undefined-undefined] } html: [regular, 4:0-4:4] { ['font-weight':'400'] @[5:4-5:21] ['font-weight':'400'] @[undefined-undefined] } === Inline style for body === ['font-weight':'normal'] @[0:0-0:20] ['width':'85%'] @[0:21-0:32] ['background-image':'url(bar.png)'] @[0:33-0:63] ['font-weight':'normal'] @[undefined-undefined] ['width':'85%'] @[undefined-undefined] ['background-image':'url("bar.png")'] @[undefined-undefined] Running: test_forcedStateHover === BODY with forced :hover === body: [user-agent] { ['display':'block'] @[undefined-undefined] ['margin-top':'8px'] @[undefined-undefined] ['margin-right':'8px'] @[undefined-undefined] ['margin-bottom':'8px'] @[undefined-undefined] ['margin-left':'8px'] @[undefined-undefined] } body: [regular, 20:0-20:4] { ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] } body: [regular, 20:0-20:4] { ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] } body: [regular, 9:0-9:4] { ['font-size':'12px'] @[10:4-10:20] ['foo':'bar ! important /* !important property not recognized by WebCore */' is-important non-parsed] @[11:4-13:66] ['height':'100% !important' is-important] @[14:4-14:28] ['colorz':'"!important"' non-parsed] @[15:4-15:25] ['important':'!important' is-important non-parsed] @[16:4-16:25] ['color':'yellow'] @[17:4-17:18] ['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[18:4-18:73] ['font-size':'12px'] @[undefined-undefined] ['color':'yellow'] @[undefined-undefined] ['height':'100% !important' is-important] @[undefined-undefined] } body.main1: [regular, 21:29-21:67] { ['color':'#F00BAA'] @[21:81-21:96] ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[21:96-21:149] ['color':'rgb(240, 11, 170)'] @[undefined-undefined] } body.main2: [regular, 23:0-23:10] { ['background':'green /* value !important comment */ !important /* no semicolon, very !important */' is-important] @[23:11-23:106] ['background-image':'initial !important' is-important] @[undefined-undefined] ['background-position-x':'initial !important' is-important] @[undefined-undefined] ['background-position-y':'initial !important' is-important] @[undefined-undefined] ['background-size':'initial !important' is-important] @[undefined-undefined] ['background-repeat':'initial !important' is-important] @[undefined-undefined] ['background-attachment':'initial !important' is-important] @[undefined-undefined] ['background-origin':'initial !important' is-important] @[undefined-undefined] ['background-clip':'initial !important' is-important] @[undefined-undefined] ['background-color':'green !important' is-important] @[undefined-undefined] } body.mainpage: [regular, 3:0-3:13] { ['text-decoration':'none'] @[4:4-4:26] ['badproperty':'1badvalue1' non-parsed] @[5:5-5:29] ['text-decoration-line':'none'] @[undefined-undefined] ['text-decoration-thickness':'initial'] @[undefined-undefined] ['text-decoration-style':'initial'] @[undefined-undefined] ['text-decoration-color':'initial'] @[undefined-undefined] } body.mainpage: [regular, 8:0-8:13] { ['prop1':'val1' non-parsed] @[9:4-9:16] ['prop2':'val2' non-parsed] @[10:4-10:16] } body:hover: [regular, 13:0-13:10] { ['color':'#CDE'] @[14:2-14:14] ['color':'rgb(204, 221, 238)'] @[undefined-undefined] } Running: test_forcedStateTarget === #target with forced :target === p: [user-agent] { ['display':'block'] @[undefined-undefined] ['margin-block-start':'1em'] @[undefined-undefined] ['margin-block-end':'1em'] @[undefined-undefined] ['margin-inline-start':'0px'] @[undefined-undefined] ['margin-inline-end':'0px'] @[undefined-undefined] } address, blockquote, center, div, figure, figcaption, footer, form, header, hr, legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section, search, table, caption, colgroup, col, thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, bdi, output, [dir="ltr" i], [dir="rtl" i], [dir="auto" i]: [user-agent] { ['unicode-bidi':'isolate'] @[undefined-undefined] } #target:target: [regular, 17:0-17:14] { ['background':'#bada55'] @[18:2-18:22] ['outline':'5px solid lime'] @[19:2-19:26] ['background-image':'initial'] @[undefined-undefined] ['background-position-x':'initial'] @[undefined-undefined] ['background-position-y':'initial'] @[undefined-undefined] ['background-size':'initial'] @[undefined-undefined] ['background-repeat':'initial'] @[undefined-undefined] ['background-attachment':'initial'] @[undefined-undefined] ['background-origin':'initial'] @[undefined-undefined] ['background-clip':'initial'] @[undefined-undefined] ['background-color':'rgb(186, 218, 85)'] @[undefined-undefined] ['outline-color':'lime'] @[undefined-undefined] ['outline-style':'solid'] @[undefined-undefined] ['outline-width':'5px'] @[undefined-undefined] } Running: test_textNodeComputedStyles === Computed style property count for TextNode === OK Running: test_tableStyles === Attributes style for table === ['width':'50%'] @[undefined-undefined] === Stylesheet-for-inline-style text === === Stylesheet-for-inline-style modification result === null Running: test_addRule === Matched rules after rule added === body: [user-agent] { ['display':'block'] @[undefined-undefined] ['margin-top':'8px'] @[undefined-undefined] ['margin-right':'8px'] @[undefined-undefined] ['margin-bottom':'8px'] @[undefined-undefined] ['margin-left':'8px'] @[undefined-undefined] } body: [regular, 20:0-20:4] { ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] } body: [regular, 20:0-20:4] { ['property':'imported-media-screen-stylesheet' non-parsed] @[21:4-21:47] } body: [regular, 9:0-9:4] { ['font-size':'12px'] @[10:4-10:20] ['foo':'bar ! important /* !important property not recognized by WebCore */' is-important non-parsed] @[11:4-13:66] ['height':'100% !important' is-important] @[14:4-14:28] ['colorz':'"!important"' non-parsed] @[15:4-15:25] ['important':'!important' is-important non-parsed] @[16:4-16:25] ['color':'yellow'] @[17:4-17:18] ['color':'"badcolor" ! important /* good property with strange value */' is-important non-parsed] @[18:4-18:73] ['font-size':'12px'] @[undefined-undefined] ['color':'yellow'] @[undefined-undefined] ['height':'100% !important' is-important] @[undefined-undefined] } body: [inspector, 0:0-0:4] { ['font-family':'serif'] @[0:6-0:25] ['font-family':'serif'] @[undefined-undefined] } body.main1: [regular, 21:29-21:67] { ['color':'#F00BAA'] @[21:81-21:96] ['zoo':'moo /* not an !important unrecognized property */' non-parsed] @[21:96-21:149] ['color':'rgb(240, 11, 170)'] @[undefined-undefined] } body.main2: [regular, 23:0-23:10] { ['background':'green /* value !important comment */ !important /* no semicolon, very !important */' is-important] @[23:11-23:106] ['background-image':'initial !important' is-important] @[undefined-undefined] ['background-position-x':'initial !important' is-important] @[undefined-undefined] ['background-position-y':'initial !important' is-important] @[undefined-undefined] ['background-size':'initial !important' is-important] @[undefined-undefined] ['background-repeat':'initial !important' is-important] @[undefined-undefined] ['background-attachment':'initial !important' is-important] @[undefined-undefined] ['background-origin':'initial !important' is-important] @[undefined-undefined] ['background-clip':'initial !important' is-important] @[undefined-undefined] ['background-color':'green !important' is-important] @[undefined-undefined] } body.mainpage: [regular, 3:0-3:13] { ['text-decoration':'none'] @[4:4-4:26] ['badproperty':'1badvalue1' non-parsed] @[5:5-5:29] ['text-decoration-line':'none'] @[undefined-undefined] ['text-decoration-thickness':'initial'] @[undefined-undefined] ['text-decoration-style':'initial'] @[undefined-undefined] ['text-decoration-color':'initial'] @[undefined-undefined] } body.mainpage: [regular, 8:0-8:13] { ['prop1':'val1' non-parsed] @[9:4-9:16] ['prop2':'val2' non-parsed] @[10:4-10:16] }