| <html> |
| <head> |
| <script> |
| function print(message, color) |
| { |
| var paragraph = document.createElement("div"); |
| paragraph.appendChild(document.createTextNode(message)); |
| paragraph.style.fontFamily = "monospace"; |
| if (color) |
| paragraph.style.color = color; |
| document.getElementById("console").appendChild(paragraph); |
| } |
| |
| function test() |
| { |
| if (window.layoutTestController) { |
| layoutTestController.dumpAsText(); |
| layoutTestController.waitUntilDone(); |
| window.setTimeout("layoutTestController.notifyDone()", 5000); // prevent hang on failure |
| } |
| |
| var div = document.createElement("div"); |
| div.setAttribute("onerror", "print('PASS: dynamic script load error bubbled'); \ |
| if (window.layoutTestController) \ |
| layoutTestController.notifyDone();"); |
| |
| var script = document.createElement("script"); |
| script.src="file:///GregTheBunny.js"; |
| div.appendChild(script); |
| |
| // force the script to load |
| document.body.appendChild(div); |
| } |
| </script> |
| </head> |
| <body onload="test();"> |
| <hr> |
| <div id='console'></div> |
| <div onerror="print('PASS: inline script load error bubbled')"> |
| <script src="file:///GregTheBunny.js"></script> |
| </div> |
| |
| </body> |
| </html> |