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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/html/imports/import-add-child-to-change-order-of-dup-css.html

Issue 2551473002: Correctly re-collect active style for html imports. (Closed)
Patch Set: Created 4 years 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 rel="import" href="resources/bye.html"></link>
5 <style>.target { color: green }</style>
6 <link rel="import" href="resources/style-red.html"></link>
7 <div class="target">This text should be green.</div>
8 <script>
9 var importDoc = document.querySelectorAll("link")[0].import;
10 var newLink = importDoc.createElement("link");
11 newLink.setAttribute("rel", "import");
12 newLink.setAttribute("href", "style-red.html");
13 var targetElement = document.querySelector(".target");
14
15 test(() => {
16 assert_equals(getComputedStyle(targetElement).color, "rgb(255, 0, 0)");
17 }, ".target should initially be red");
18
19 importDoc.head.appendChild(newLink);
20
21 test(() => {
22 assert_equals(getComputedStyle(targetElement).color, "rgb(0, 128, 0)");
23 }, ".target should be green after style-red.html is inserted as an import ch ild before the inline green style.");
24 </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