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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <div id="container" lang="ja">
5 <div id="host"></div>
6 <div id="hostWithContent"><div>Should be visible</div></div>
7 </div>
8 <script>
9 var host = document.getElementById("host");
10 var root = host.createShadowRoot();
11 root.innerHTML = "<style>:lang(ja) { display:none; }</style><div lang='fr'>Shoul d be visible</div><div>Should be hidden</div>";
12 test(function () {
13 var japanese = root.lastChild;
14 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.
15 }, "lang inherits into shadow tree");
16
17 host = document.getElementById("hostWithContent");
18 root = host.createShadowRoot();
19 root.innerHTML = "<style>:lang(ja) { display:none; }</style><div lang='fr'><cont ent></content></div>";
20 test(function () {
21 var content = host.firstChild;
22 assert_not_equals(content.offsetHeight, 0);
23 }, "lang of distributed content traverses composed tree");
24 if (window.testRunner)
25 container.style.display = "none";
26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698