Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: LayoutTests/fast/events/onbeforeunload-focused-iframe.html

Issue 187103002: id of iframe incorrectly sets window name (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add back no-referrer-subframe.html Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <body> 2 <body>
3 New window with beforeUnload handler.<br> 3 New window with beforeUnload handler.<br>
4 You should see an alert with "beforeUnload" if you try to close the window.< br> 4 You should see an alert with "beforeUnload" if you try to close the window.< br>
5 <iframe src="resources/onbeforeunload-focused-iframe-frame.html" id="focused Frame"></iframe> 5 <iframe src="resources/onbeforeunload-focused-iframe-frame.html" name="focus edFrame"></iframe>
6 <script> 6 <script>
7 if (window.testRunner) { 7 if (window.testRunner) {
8 testRunner.dumpAsText(); 8 testRunner.dumpAsText();
9 testRunner.dumpChildFramesAsText(); 9 testRunner.dumpChildFramesAsText();
10 testRunner.waitUntilDone(); 10 testRunner.waitUntilDone();
11 } 11 }
12 12
13 window.onbeforeunload = beforeUnload; 13 window.onbeforeunload = beforeUnload;
14 function beforeUnload() 14 function beforeUnload()
15 { 15 {
16 alert("beforeUnload"); 16 alert("beforeUnload");
17 window.onbeforeunload = null; 17 window.onbeforeunload = null;
18 } 18 }
19 19
20 20
21 function simulateCloseWindow() 21 function simulateCloseWindow()
22 { 22 {
23 if (window.testRunner) { 23 if (window.testRunner) {
24 // Simulate an attempt to close the window 24 // Simulate an attempt to close the window
25 if (!testRunner.callShouldCloseOnWebView()) 25 if (!testRunner.callShouldCloseOnWebView())
26 alert("Should have run the beforeUnload handler."); 26 alert("Should have run the beforeUnload handler.");
27 testRunner.notifyDone(); 27 testRunner.notifyDone();
28 } 28 }
29 } 29 }
30 </script> 30 </script>
31 </body> 31 </body>
32 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698