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

Side by Side Diff: LayoutTests/fast/css/invalidation/shadow-add-sheet-content.html

Issue 1313443003: Fix crash when removing stylesheets from shadow tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed review issues and added test. Created 5 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/shadow-add-sheet-content-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style>
4 #outerHost { color: red }
5 </style>
6 <div>
7 <div id="outerHost">
8 <span id="outerSpan"></span>
9 </div>
10 <div></div>
11 <div></div>
12 <div></div>
13 <div></div>
14 <div></div>
15 <div></div>
16 <div></div>
17 <div></div>
18 </div>
19 <script>
20 description("Insert a style element into a shadow tree affecting a distribut ed node.");
21
22 var outerRoot = outerHost.createShadowRoot();
23 outerRoot.innerHTML = "<div id='host1'><content/></div>";
24
25 var host1 = outerRoot.querySelector("#host1");
26 var root1 = host1.createShadowRoot();
27 root1.innerHTML = "<div id='host2'><content/></div>";
28
29 var host2 = root1.querySelector("#host2");
30 var root2 = host2.createShadowRoot();
31 root2.innerHTML = "<content/>";
32
33 shouldBeEqualToString("getComputedStyle(outerSpan).color", "rgb(255, 0, 0)") ;
34
35 var sheet = document.createElement("style");
36 sheet.appendChild(document.createTextNode("::content #outerSpan { color: gre en }"));
37 root2.appendChild(sheet);
38
39 if (window.internals)
40 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "9");
41
42 shouldBeEqualToString("getComputedStyle(outerSpan).color", "rgb(0, 128, 0)") ;
43 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/shadow-add-sheet-content-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698