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

Side by Side Diff: LayoutTests/fast/events/before-unload-return-bad-value.html

Issue 23600034: Use TRYCATCH_FOR_V8STRINGRESOURCE in AbstractEventListener::invokeEventHandler() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/before-unload-return-bad-value-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 <script>
6 if (window.testRunner)
7 testRunner.setShouldStayOnPageAfterHandlingBeforeUnload(true);
8
9 window.onload = function() {
10 window.location.href = "resources/does-not-exist.html";
11 setTimeout(finishJSTest, 0);
arv (Not doing code reviews) 2013/09/11 13:42:19 Why is this needed? window.onerror calls finishJST
do-not-use 2013/09/11 14:12:29 I had it in case it did not throw, to avoid a time
12 }
arv (Not doing code reviews) 2013/09/11 13:42:19 semicolons after assignment.
13
14 var nonConvertibleToString = {toString: function() { throw "Exception in toStrin g()"; }};
15
16 var testMessage;
17 window.onerror = function(msg) {
18 testMessage = msg;
19 shouldBeEqualToString("testMessage", "Uncaught Exception in toString()");
20 setTimeout(finishJSTest, 0);
do-not-use 2013/09/11 09:00:43 I am not quite sure why this setTimeout() is neede
haraken 2013/09/11 09:08:44 Looks strange. arv, do you have any idea?
arv (Not doing code reviews) 2013/09/11 13:42:19 I'm not sure. Maybe it is related to setShouldStay
21 return true;
22 }
23
24 window.onbeforeunload = function(event) {
25 return nonConvertibleToString;
26 }
27 </script>
28 </head>
29 <body>
30 <script>
31 description("Tests that an exception is thrown when the value returned in the be foreunload callback cannot be converted to a String");
32 window.jsTestIsAsync = true;
arv (Not doing code reviews) 2013/09/11 13:42:19 move this to other script block, before if window.
33 </script>
34 <script src="../js/resources/js-test-post.js"></script>
35 </body>
36 </html>
37
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/before-unload-return-bad-value-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698