Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / onerror-bubbling.html
blobcb4147d7027c2e6a203c811a8fd89f5ba0f1b676
1 <html>
2 <head>
3 <script>
4 function print(message, color)
6 var paragraph = document.createElement("div");
7 paragraph.appendChild(document.createTextNode(message));
8 paragraph.style.fontFamily = "monospace";
9 if (color)
10 paragraph.style.color = color;
11 document.getElementById("console").appendChild(paragraph);
14 function test()
16 if (window.testRunner) {
17 testRunner.dumpAsText();
18 testRunner.waitUntilDone();
19 window.setTimeout("testRunner.notifyDone()", 5000); // prevent hang on failure
22 var div = document.createElement("div");
23 div.setAttribute("onerror", "print('FAILED: dynamic script load error bubbled'); \
24 if (window.testRunner) \
25 testRunner.notifyDone();");
27 var script = document.createElement("script");
28 script.src="file:///GregTheBunny.js";
29 div.appendChild(script);
31 // force the script to load
32 document.body.appendChild(div);
35 function scriptOnerror()
37 print('PASS: script error handler invoked');
39 // Allow event bubbling phase to complete.
40 setTimeout(function() {
41 if (window.testRunner)
42 testRunner.notifyDone();
43 }, 0);
46 window.onerror = function() {
47 print('FAILED: window.onerror handler invoked');
49 </script>
50 </head>
51 <body onload="test();">
52 <hr>
53 <div id='console'></div>
54 <div onerror="print('FAILED: inline script load error bubbled')">
55 <script src="file:///GregTheBunny.js" onerror="scriptOnerror()"></script>
56 </div>
58 </body>
59 </html>