Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLStyleElement / style-onerror.html
blob440235666ec130f368058d2a91c4993e22d18889
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../HTMLLinkElement/resources/link-load-utilities.js"></script>
5 <script>
6 function passed()
8 testPassed("Error event fired.");
9 shouldComputedColorOfElementBeEqualToRGBString(document.getElementById("test"), "rgb(255, 255, 0)" /* yellow */);
10 testFinished();
12 </script>
13 <style onload="testFailedAndNotifyDone('Load event fired. Should have fired Error event.')" onerror="passed()">
14 @import "resources/non-existent-stylesheet.css";
15 #test { color: yellow; }
16 </style>
17 </head>
18 <body>
19 <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>
20 <h1 id="test"><!-- Test element --></h1>
21 <pre id="console"></pre>
22 </body>
23 </html>