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

Unified Diff: LayoutTests/fast/html/imports/import-readd.html

Issue 331763002: HTML Imports: styles in removed imports should be applied when it comes back (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/html/imports/import-readd-dup-nested.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/html/imports/import-readd.html
diff --git a/LayoutTests/fast/html/imports/import-readd.html b/LayoutTests/fast/html/imports/import-readd.html
new file mode 100644
index 0000000000000000000000000000000000000000..7686c67481fdd953f1ffd602f7cba4e6adef10a9
--- /dev/null
+++ b/LayoutTests/fast/html/imports/import-readd.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.html">
+</head>
+<body>
+<h1 class="target">Should be red</h1>
+<script>
+var t = async_test('Styles 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>
« no previous file with comments | « no previous file | LayoutTests/fast/html/imports/import-readd-dup-nested.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698