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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/host-link-style.html

Issue 2472613004: Remove ShadowRoot::numberOfStyles(). (Closed)
Patch Set: Rebased Created 4 years, 1 month 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/Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/shadow-dom/host-link-style.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/host-link-style.html b/third_party/WebKit/LayoutTests/shadow-dom/host-link-style.html
new file mode 100644
index 0000000000000000000000000000000000000000..b9b171cddc536d2975c56653cf31892754d94ac9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/shadow-dom/host-link-style.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<div id="host">This text should have a green background.</div>
+<script>
+ test(() => {
+ var root = host.attachShadow({mode:'open'});
+ root.innerHTML = '<link rel="stylesheet" href="data:text/css,:host{background:green}"><slot />';
+ assert_equals(getComputedStyle(host).backgroundColor, "rgb(0, 128, 0)", "Host background should be green.");
+ }, "Check that :host rule from link stylesheet applies to host element.");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698