Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound.html

Issue 1872343002: Allow multiple host pseudos in same compound. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... and a test with :host() Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound.html
new file mode 100644
index 0000000000000000000000000000000000000000..5de532b1a3b6ce80313dd7d248cdb58fe8542a07
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<div id="host">Should be green</div>
+<script>
+ description("Multiple :host(-context) pseudos in same compound.");
+
+ host.createShadowRoot();
+
+ [
+ ":host:host-context(body)",
+ ":host-context(:not(.nomatch)):host",
+ ":host:host:host",
+ ":host-context(body):host-context(html)",
+ ":host(:not(.nomatch)):host"
+ ].forEach((selector) => {
+ host.shadowRoot.innerHTML = "<style>" + selector + "{color:green}</style><content/>";
+ shouldBeEqualToString("getComputedStyle(host).color", "rgb(0, 128, 0)");
+
+ host.shadowRoot.innerHTML = "<style>" + selector + "::before" + "{color:green;content:'green'}</style><content/>";
+ shouldBeEqualToString("getComputedStyle(host, '::before').color", "rgb(0, 128, 0)");
+ });
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698