Update DOMCoreException to use the description in toString().
[WebKit-https.git] / LayoutTests / loader / load-defer.html
1 <!DOCTYPE html>
2 <html>
3 <script>
4 if (window.testRunner) {
5     testRunner.dumpAsText();
6     testRunner.waitUntilDone();
7 }
8
9 var testFrame;
10
11 function loadedTooEarly()
12 {
13     alert("FAIL: The frame loaded while loads were deferred.");
14     testRunner.notifyDone();
15 }
16
17 function passAndFinish()
18 {
19     alert("PASS: The frame loaded after loads were resumed.");
20     testRunner.notifyDone();
21 }
22
23 function resumeLoads()
24 {
25     testFrame.onload = passAndFinish;
26     if (window.testRunner)
27         testRunner.setDefersLoading(false);
28 }
29
30 function runTest()
31 {
32     alert("Test that load deferring works as intended.");
33     if (window.testRunner)
34         testRunner.setDefersLoading(true);
35
36     testFrame = document.createElement("iframe");
37     testFrame.onload = loadedTooEarly;
38     testFrame.src = "resources/images.html";
39     document.body.appendChild(testFrame);
40     setTimeout(resumeLoads, 100);
41 }
42
43 </script>
44 <body onload='runTest()'>
45 </body>
46 </html>