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

Side by Side Diff: LayoutTests/fast/html/imports/import-readd-order-2.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 id=redImport href="./resources/style-red.html">
7 <link rel=import id=blueImport href="./resources/style-blue.html">
8 </head>
9 <body>
10 <h1 class="target">Should be red</h1>
11 <script>
12 var t = async_test('Styles are re-applied in correct ordder after removed import s are re-added in new place');
13 window.onload = function() {
14 t.step(function() {
15 assert_equals(window.getComputedStyle(document.querySelector('.target')) .color, 'rgb(0, 0, 255)');
16 var importLink = document.querySelector('#blueImport');
17 document.head.removeChild(importLink);
18 document.head.insertBefore(importLink, document.head.lastElementChild);
19 assert_equals(window.getComputedStyle(document.querySelector('.target')) .color, 'rgb(255, 0, 0)');
20 Array.prototype.forEach.call(document.querySelectorAll("h1"), function(e ) { e.style.display = "none"; });
21 t.done();
22 });
23 }
24 </script>
25 </body>
26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698