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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/alternate-stylesheets.html

Issue 1717303002: Ignore title attribute for style elements in shadow trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use isInShadowTree Created 4 years, 10 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/alternate-stylesheets-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/alternate-stylesheets.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/alternate-stylesheets.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/alternate-stylesheets.html
new file mode 100644
index 0000000000000000000000000000000000000000..1b97b2c910eeba3f95d3bc00546a09895deb2604
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/alternate-stylesheets.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<div id="host"></div>
+<script>
+ var root = host.createShadowRoot();
+ root.innerHTML = '<style title="not-preferred">div { color: red }</style><style title="ignored">div { color: green }</style><div>Should be green</div>';
+</script>
+<style>#alternate { color: green }</style>
+<link rel="alternate stylesheet" title="not-preferred" href="data:text/css,#alternate { color: red }">
+</style>
+<div id="alternate">Should be green</div>
+<script>
+ description("Title attribute should be ignored for style elements in shadow trees.");
+
+ shouldBeEqualToString("getComputedStyle(root.querySelector('div')).color", "rgb(0, 128, 0)");
+ shouldBeEqualToString("getComputedStyle(alternate).color", "rgb(0, 128, 0)");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/shadow/alternate-stylesheets-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698