| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../HTMLLinkElement/resources/link-load-utilities.js"></script> |
| <script> |
| function checkResult() |
| { |
| testPassed("Error event fired."); |
| shouldComputedColorOfElementBeEqualToRGBString(document.getElementById("test"), "rgb(0, 0, 255)" /* blue */); // i.e. stylesheet.css successfully loaded |
| testFinished(); |
| } |
| </script> |
| <style onload="testFailedAndNotifyDone('Load event fired. Should have fired Error event.')" onerror="checkResult()"> |
| @import "../HTMLLinkElement/resources/stylesheet.css"; |
| @import "resources/non-existent-stylesheet.css"; |
| #test { color: yellow; } |
| </style> |
| </head> |
| <body> |
| <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> |
| <h1 id="test"><!-- Test element --></h1> |
| <pre id="console"></pre> |
| </body> |
| </html> |