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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/css/ignore-pending-style-import.html

Issue 1867753006: Revert of Don't apply style elements or PIs with loading imports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <h1 id="h1"></h1>
3 <pre id="res"></pre>
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
8 }
9
10 var result = "";
11
12 function expectComputedOnH1(name, expected) {
13 var value = getComputedStyle(h1)[name];
14 result += name + ": ";
15 if (value == expected)
16 result += "PASS\n";
17 else
18 result += "FAIL - " + value + ", expected " + expected + "\n";
19 }
20
21 function sheetLoaded() {
22 expectComputedOnH1("backgroundColor", "rgb(0, 128, 0)");
23 expectComputedOnH1("color", "rgb(0, 128, 0)");
24 res.innerHTML = result;
25 if (window.testRunner)
26 testRunner.notifyDone();
27 }
28
29 var style = document.createElement("style");
30 style.appendChild(document.createTextNode("@import url(http://localhost:8080 /css/resources/slow-loading-sheet.php?color=green); h1{color:green}"));
31 style.setAttribute("onload", "sheetLoaded()");
32 document.head.appendChild(style);
33
34 document.body.offsetTop;
35 expectComputedOnH1("backgroundColor", "rgba(0, 0, 0, 0)");
36 expectComputedOnH1("color", "rgb(0, 0, 0)");
37
38 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698