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

Side by Side Diff: LayoutTests/fast/events/before-unload-returnValue.html

Issue 48903019: Delete js-test-post.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../js/resources/js-test-pre.js"></script> 4 <script src="../js/resources/js-test-pre.js"></script>
5 <script> 5 <script>
6 if (window.testRunner) 6 if (window.testRunner)
7 testRunner.setShouldStayOnPageAfterHandlingBeforeUnload(true); 7 testRunner.setShouldStayOnPageAfterHandlingBeforeUnload(true);
8 8
9 window.onload = function() { 9 window.onload = function() {
10 window.location.href = "resources/does-not-exist.html"; 10 window.location.href = "resources/does-not-exist.html";
11 setTimeout(finishJSTest, 0); 11 setTimeout(finishJSTest, 0);
12 } 12 }
13 13
14 var testEvent; 14 var testEvent;
15 window.onbeforeunload = function(event) { 15 window.onbeforeunload = function(event) {
16 testEvent = event; 16 testEvent = event;
17 shouldBe("testEvent.__proto__", "BeforeUnloadEvent.prototype"); 17 shouldBe("testEvent.__proto__", "BeforeUnloadEvent.prototype");
18 shouldBeEqualToString("testEvent.returnValue", ""); 18 shouldBeEqualToString("testEvent.returnValue", "");
19 event.returnValue = "This is beforeunload from the top level frame."; 19 event.returnValue = "This is beforeunload from the top level frame.";
20 shouldBeEqualToString("testEvent.returnValue", "This is beforeunload from th e top level frame."); 20 shouldBeEqualToString("testEvent.returnValue", "This is beforeunload from th e top level frame.");
21 } 21 }
22 </script> 22 </script>
23 </head> 23 </head>
24 <body> 24 <body>
25 <script> 25 <script>
26 description("Tests the returnValue attribute of the BeforeUnloadEvent."); 26 description("Tests the returnValue attribute of the BeforeUnloadEvent.");
27 self.jsTestIsAsync = true; 27 self.jsTestIsAsync = true;
28 </script> 28 </script>
29 <script src="../js/resources/js-test-post.js"></script>
30 </body> 29 </body>
31 </html> 30 </html>
32 31
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698