blob: b59425e4bc810c6545368f8e4a903bcb5d479459 [file] [log] [blame]
Test whether :host-context matches a shadow host correctly.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
:host-context out of shadow tree should not match any shadow hosts.
PASS backgroundColorOf('host') is "rgba(0, 0, 0, 0)"
:host-context with * should not match any shadow hosts.
PASS backgroundColorOf('host') is "rgba(0, 0, 0, 0)"
:host-context with tag selector should not match any shadow hosts.
PASS backgroundColorOf('host') is "rgba(0, 0, 0, 0)"
:host-context with class selector should not match any shadow hosts.
PASS backgroundColorOf('host') is "rgba(0, 0, 0, 0)"
:host-context with id selector should not match any shadow hosts.
PASS backgroundColorOf('host') is "rgba(0, 0, 0, 0)"
:host-context with attribute selector should not match any shadow hosts.
PASS backgroundColorOf('host') is "rgba(0, 0, 0, 0)"
:host-context in a shadow tree should match its shadow host.
PASS backgroundColorOf('host') is "rgb(0, 128, 0)"
:host-context with :host in a shadow tree should match its shadow host.
PASS backgroundColorOf('host') is "rgb(0, 128, 0)"
crbug.com/552602 :host-context with non-matching selector with :host should not crash.
PASS backgroundColorOf('host') is "rgba(0, 0, 0, 0)"
:host-context takes simple selectors and matches when one of the simple selectors matches.
PASS backgroundColorOf('host') is "rgb(0, 128, 0)"
:host-context matches a shadow host in just a nested shadow tree, not all enclosing shadow trees.
PASS backgroundColorOf('host1') is "rgba(0, 0, 0, 0)"
PASS backgroundColorOf('host1/host2') is "rgb(0, 128, 0)"
:host-context matches based on a flat tree.
PASS backgroundColorOf('host/target') is "rgb(0, 128, 0)"
:host-context is updated when its matched ancestor changes className or id.
PASS backgroundColorOf('host') is "rgb(0, 128, 0)"
PASS backgroundColorOf('host') is "rgba(0, 0, 0, 0)"
PASS backgroundColorOf('host') is "rgb(0, 128, 0)"
PASS backgroundColorOf('host') is "rgba(0, 0, 0, 0)"
Compare :host-context with :host-context.
PASS backgroundColorOf('host') is "rgb(0, 128, 0)"
PASS backgroundColorOf('host') is "rgb(255, 0, 0)"
PASS backgroundColorOf('host/target') is "rgb(0, 128, 0)"
PASS backgroundColorOf('host/target') is "rgb(0, 128, 0)"
PASS backgroundColorOf('host/target') is "rgb(0, 128, 0)"
:host-context without functional notation should not match any shadow hosts.
PASS backgroundColorOf('host') is "rgba(0, 0, 0, 0)"
PASS successfullyParsed is true
TEST COMPLETE