The beforeload event allows tracking URI changes in a frame
[WebKit-https.git] / LayoutTests / http / tests / security / beforeload-iframe-server-redirect.html
1 <script>
2 if (window.layoutTestController) {
3     layoutTestController.dumpAsText();
4     layoutTestController.waitUntilDone();
5 }
6
7 window.addEventListener('message', function(evt) {
8     if (window.layoutTestController)
9         layoutTestController.notifyDone();
10 }, false);
11 </script>
12 This test produces output in the console.  Only the initial URL should be logged.
13 <iframe
14   src="http://127.0.0.1:8000/security/resources/redir.php?url=http://localhost:8000/security/resources/post-done.html"
15   onbeforeload="console.log(event.url)">
16 </iframe>