OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../../resources/testharness.js"></script> |
| 5 <script src="../../../resources/testharnessreport.js"></script> |
| 6 <link rel=import href="./resources/style-red-parent.html"> |
| 7 </head> |
| 8 <body> |
| 9 <h1 class="target">Should be red</h1> |
| 10 <script> |
| 11 var t = async_test('Styles in grandchild are re-applied after removed imports ar
e re-added'); |
| 12 window.onload = function() { |
| 13 t.step(function() { |
| 14 var importLink = document.querySelector('link'); |
| 15 document.head.removeChild(importLink); |
| 16 document.head.appendChild(importLink); |
| 17 assert_equals(window.getComputedStyle(document.querySelector('.target'))
.color, 'rgb(255, 0, 0)'); |
| 18 Array.prototype.forEach.call(document.querySelectorAll("h1"), function(e
) { e.style.display = "none"; }); |
| 19 t.done(); |
| 20 }); |
| 21 } |
| 22 </script> |
| 23 </body> |
| 24 </html> |
OLD | NEW |