Index: LayoutTests/fast/html/imports/import-readd-nested.html |
diff --git a/LayoutTests/fast/html/imports/import-readd-nested.html b/LayoutTests/fast/html/imports/import-readd-nested.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6f5219ecd501894c7d71bbf770e4756d94e94642 |
--- /dev/null |
+++ b/LayoutTests/fast/html/imports/import-readd-nested.html |
@@ -0,0 +1,24 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<link rel=import href="./resources/style-red-parent.html"> |
+</head> |
+<body> |
+<h1 class="target">Should be red</h1> |
+<script> |
+var t = async_test('Styles in grandchild are re-applied after removed imports are re-added'); |
+window.onload = function() { |
+ t.step(function() { |
+ var importLink = document.querySelector('link'); |
+ document.head.removeChild(importLink); |
+ document.head.appendChild(importLink); |
+ assert_equals(window.getComputedStyle(document.querySelector('.target')).color, 'rgb(255, 0, 0)'); |
+ Array.prototype.forEach.call(document.querySelectorAll("h1"), function(e) { e.style.display = "none"; }); |
+ t.done(); |
+ }); |
+} |
+</script> |
+</body> |
+</html> |