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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/html/imports/import-css-sheet-in-shadow.html

Issue 2884993002: Don't trigger full active style update on styleSheets access. (Closed)
Patch Set: Not clearing document_scope_dirty_ flag in import styleSheets anymore. Created 3 years, 7 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 | third_party/WebKit/Source/core/dom/StyleEngine.h » ('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/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <link id="importLink" rel="import" href="data:text/html,<div id=host></div>">
5 <script>
6 var importDoc = importLink.import;
7 var root = importDoc.querySelector("#host").attachShadow({mode:"open"});
8 var shadowStyle = importDoc.createElement("style");
9 shadowStyle.appendChild(importDoc.createTextNode("div{color:pink}"));
10 root.appendChild(shadowStyle);
11
12 test(() => {
13 assert_true(!!shadowStyle.sheet,
14 "The shadow tree Element.sheet should be defined.");
15 assert_equals(shadowStyle.sheet.cssRules.length, 1,
16 "The number of rules in the shadow tree stylesheet should 1.");
17 }, "Element.sheet on style element in shadow tree in html import.");
18
19 test(() => {
20 assert_equals(root.styleSheets.length, 1,
21 "Length of the ShadowRoot.styleSheets should be 1.");
22 assert_equals(root.styleSheets[0].cssRules.length, 1,
23 "The number of rules in the shadow stylesheet should be 1.");
24 }, "ShadowRoot.styleSheets on shadow root in html import.");
25 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698