aestes@apple.com | 47ac5e1 | 2014-08-18 17:48:48 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="refresh" content="0; url=http://A=a&B=b"> |
| 5 | <script> |
| 6 | if (window.testRunner) { |
| 7 | testRunner.dumpAsText(); |
| 8 | testRunner.setCustomPolicyDelegate(true, false); |
| 9 | testRunner.waitUntilDone(); |
| 10 | } |
| 11 | </script> |
| 12 | </head> |
| 13 | <body> |
| 14 | <p>Tests that we do not redirect to an invalid URL initiated by <meta http-equiv="refresh">. This test PASSED if you see an entry in the dumped frame load callbacks of the form: "willPerformClientRedirectToURL: http://A=a&B=b" followed by "didCancelClientRedirectForFrame".</p> |
| 15 | <p>Note, this test must be run in DumpRenderTree.</p> |
| 16 | <script> |
| 17 | // This ugly double-timeout ensures that the scheduled meta-refresh, whose timer isn't even started until the frame finishes loading, |
| 18 | // fires before notifyDone() is called, ensuring that didCancelClientRedirectForFrame is logged by DumpRenderTree. |
| 19 | window.setTimeout(function() { |
| 20 | window.setTimeout(function() { |
| 21 | if (window.testRunner) |
| 22 | testRunner.notifyDone(); |
| 23 | }, 0); |
| 24 | }, 0); |
| 25 | </script> |
| 26 | </body> |
| 27 | </html> |