blob: 320d9a5cce7c7b5386803648f4ff1c7fbed5b336 [file] [log] [blame]
Tests that InspectorCSSAgent API methods work as expected.
H1
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]
}
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]
}
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' is-important] @[undefined-undefined]
['background-repeat-x':'initial' is-important] @[undefined-undefined]
['background-repeat-y':'initial' is-important] @[undefined-undefined]
['background-attachment':'initial' is-important] @[undefined-undefined]
['background-position-x':'initial' is-important] @[undefined-undefined]
['background-position-y':'initial' is-important] @[undefined-undefined]
['background-origin':'initial' is-important] @[undefined-undefined]
['background-clip':'initial' is-important] @[undefined-undefined]
['background-color':'green' is-important] @[undefined-undefined]
['background-size':'initial' 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-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 ===
PseudoId=4
body::after: [regular, 26:0-26:11] {
['content':'"After body"'] @[27:4-27:26]
}
=== Inherited styles for body ===
Level=1
[NO STYLE]
html: [user-agent] {
['display':'block'] @[undefined-undefined]
}
html: [regular, 4:0-4:4] {
['font-weight':'400'] @[5:4-5:21]
}
=== 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]
Running: test_forcedState
=== 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]
}
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]
}
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' is-important] @[undefined-undefined]
['background-repeat-x':'initial' is-important] @[undefined-undefined]
['background-repeat-y':'initial' is-important] @[undefined-undefined]
['background-attachment':'initial' is-important] @[undefined-undefined]
['background-position-x':'initial' is-important] @[undefined-undefined]
['background-position-y':'initial' is-important] @[undefined-undefined]
['background-origin':'initial' is-important] @[undefined-undefined]
['background-clip':'initial' is-important] @[undefined-undefined]
['background-color':'green' is-important] @[undefined-undefined]
['background-size':'initial' 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-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]
}
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]
}
body: [inspector, 0:0-0:4] {
['font-family':'serif'] @[0:6-0:25]
}
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]
}
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' is-important] @[undefined-undefined]
['background-repeat-x':'initial' is-important] @[undefined-undefined]
['background-repeat-y':'initial' is-important] @[undefined-undefined]
['background-attachment':'initial' is-important] @[undefined-undefined]
['background-position-x':'initial' is-important] @[undefined-undefined]
['background-position-y':'initial' is-important] @[undefined-undefined]
['background-origin':'initial' is-important] @[undefined-undefined]
['background-clip':'initial' is-important] @[undefined-undefined]
['background-color':'green' is-important] @[undefined-undefined]
['background-size':'initial' 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-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]
}