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

Unified Diff: LayoutTests/fast/dom/shadow/lang-attribute-inherit.html

Issue 859943002: Use the composed tree for the title attributes in Shadow DOM (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
Index: LayoutTests/fast/dom/shadow/lang-attribute-inherit.html
diff --git a/LayoutTests/fast/dom/shadow/lang-attribute-inherit.html b/LayoutTests/fast/dom/shadow/lang-attribute-inherit.html
new file mode 100644
index 0000000000000000000000000000000000000000..ba3f7974887e9c848a6247b5cbb606f56ee4eef1
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/lang-attribute-inherit.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<div id="container" lang="ja">
+ <div id="host"></div>
+ <div id="hostWithContent"><div>Should be visible</div></div>
+</div>
+<script>
+var host = document.getElementById("host");
+var root = host.createShadowRoot();
+root.innerHTML = "<style>:lang(ja) { display:none; }</style><div lang='fr'>Should be visible</div><div>Should be hidden</div>";
+test(function () {
+ var japanese = root.lastChild;
+ assert_equals(japanese.offsetHeight, 0);
hayato 2015/01/21 09:04:50 Could you also assert "<div lang='fr'>Should be vi
kojii 2015/01/21 16:46:20 Done.
+}, "lang inherits into shadow tree");
+
+host = document.getElementById("hostWithContent");
+root = host.createShadowRoot();
+root.innerHTML = "<style>:lang(ja) { display:none; }</style><div lang='fr'><content></content></div>";
+test(function () {
+ var content = host.firstChild;
+ assert_not_equals(content.offsetHeight, 0);
+}, "lang of distributed content traverses composed tree");
+if (window.testRunner)
+ container.style.display = "none";
+</script>

Powered by Google App Engine
This is Rietveld 408576698