Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLStyleElement / style-onerror-with-existent-and-non-existent-import.html
blob3f9ea825667fb66935c68635d6fc06621bb022f8
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../HTMLLinkElement/resources/link-load-utilities.js"></script>
5 <script>
6 function checkResult()
8 testPassed("Error event fired.");
9 shouldComputedColorOfElementBeEqualToRGBString(document.getElementById("test"), "rgb(0, 0, 255)" /* blue */); // i.e. stylesheet.css successfully loaded
10 testFinished();
12 </script>
13 <style onload="testFailedAndNotifyDone('Load event fired. Should have fired Error event.')" onerror="checkResult()">
14 @import "../HTMLLinkElement/resources/stylesheet.css";
15 @import "resources/non-existent-stylesheet.css";
16 #test { color: yellow; }
17 </style>
18 </head>
19 <body>
20 <p>This tests that a Error event is fired at an HTML Style element whose @import style sheet failed to load. This test PASSED if there are only PASS messages below. Otherwise, it FAILED.</p>
21 <h1 id="test"><!-- Test element --></h1>
22 <pre id="console"></pre>
23 </body>
24 </html>