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

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

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed html import issue. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/html/imports/import-add-child-to-change-order-of-dup-css.html
diff --git a/third_party/WebKit/LayoutTests/fast/html/imports/import-add-child-to-change-order-of-dup-css.html b/third_party/WebKit/LayoutTests/fast/html/imports/import-add-child-to-change-order-of-dup-css.html
new file mode 100644
index 0000000000000000000000000000000000000000..394146ba66319bfb8e6b1b57b1128f86f6305400
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/html/imports/import-add-child-to-change-order-of-dup-css.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<link rel="import" href="resources/bye.html"></link>
+<style>.target { color: green }</style>
+<link rel="import" href="resources/style-red.html"></link>
+<div class="target">This text should be green.</div>
+<script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ var importDoc = document.querySelectorAll("link")[0].import;
+ var newLink = importDoc.createElement("link");
+ newLink.setAttribute("rel", "import");
+ newLink.setAttribute("href", "style-red.html");
+ var targetElement = document.querySelector(".target");
+
+ test(() => {
+ assert_equals(getComputedStyle(targetElement).color, "rgb(255, 0, 0)");
+ }, ".target should initially be red");
+
+ importDoc.head.appendChild(newLink);
+
+ test(() => {
+ assert_equals(getComputedStyle(targetElement).color, "rgb(0, 128, 0)");
+ }, ".target should be green after style-red.html is inserted as an import child before the inline green style.");
+</script>

Powered by Google App Engine
This is Rietveld 408576698