| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script> | 4 <script> |
| 5 if (window.testRunner) { | 5 if (window.testRunner) { |
| 6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
| 7 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
| 8 } | 8 } |
| 9 | 9 |
| 10 // JavaScript onbeforeunload dialogs require a user gesture. |
| 11 if (window.eventSender) { |
| 12 eventSender.mouseMoveTo(5, 5); |
| 13 eventSender.mouseDown(); |
| 14 eventSender.mouseUp(); |
| 15 } |
| 16 |
| 10 window.onload = function() | 17 window.onload = function() |
| 11 { | 18 { |
| 12 window.setTimeout("window.location.href = 'resources/notify-done.html';"
, 0); | 19 window.setTimeout("window.location.href = 'resources/notify-done.html';"
, 0); |
| 13 } | 20 } |
| 14 | 21 |
| 15 window.onbeforeunload = function() | 22 window.onbeforeunload = function() |
| 16 { | 23 { |
| 17 return "This is beforeunload from the top level frame."; | 24 return "This is beforeunload from the top level frame."; |
| 18 } | 25 } |
| 19 </script> | 26 </script> |
| 20 <body> | 27 <body> |
| 21 <p>This page registers a 'beforeunload' handler, and contains multiple IFram
es that each do the same. Only the initial dialog from this top-level frame shou
ld display. The IFrame dialogs should be suppressed.</p> | 28 <p>This page registers a 'beforeunload' handler, and contains multiple IFram
es that each do the same. Only the initial dialog from this top-level frame shou
ld display. The IFrame dialogs should be suppressed.</p> |
| 22 <iframe src="resources/iframe-with-beforeunload.html"></iframe> | 29 <iframe src="resources/iframe-with-beforeunload.html"></iframe> |
| 23 <iframe src="resources/iframe-with-beforeunload.html"></iframe> | 30 <iframe src="resources/iframe-with-beforeunload.html"></iframe> |
| 24 </body> | 31 </body> |
| 25 </html> | 32 </html> |
| OLD | NEW |