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

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

Issue 576323004: Drop unnecessary v8::TryCatch in V8StringResource::prepare() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: attempt at fixing before-unload-return-bad-value.html Created 6 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
« no previous file with comments | « no previous file | LayoutTests/platform/linux/storage/websql/sql-error-codes-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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script> 5 <script>
6 description("Tests that an exception is thrown when the value returned in the be foreunload callback cannot be converted to a String"); 6 description("Tests that an exception is thrown when the value returned in the be foreunload callback cannot be converted to a String");
7 window.jsTestIsAsync = true; 7 window.jsTestIsAsync = true;
8 8
9 var alreadyTested = false;
9 function test(frame) { 10 function test(frame) {
11 if (alreadyTested)
12 return;
13 alreadyTested = true;
14
10 frame.contentWindow.onbeforeunload = function(event) { 15 frame.contentWindow.onbeforeunload = function(event) {
11 return {toString: function() { throw "Exception in toString()"; }}; 16 return {toString: function() { throw "Exception in toString()"; }};
12 }; 17 };
13 18
14 frame.contentWindow.location.href = "resources/does-not-exist.html"; 19 frame.contentWindow.location.href = "resources/does-not-exist.html";
15 setTimeout(finishJSTest, 0); 20 setTimeout(finishJSTest, 0);
16 } 21 }
17 22
18 var testMessage; 23 var testMessage;
19 window.onerror = function(msg) { 24 window.onerror = function(msg) {
20 testMessage = msg; 25 testMessage = msg;
21 testPassed("Exception was thrown"); 26 testPassed("Exception was thrown");
22 shouldBeEqualToString("testMessage", "Uncaught Exception in toString()"); 27 shouldBeEqualToString("testMessage", "Uncaught Exception in toString()");
23 setTimeout(finishJSTest, 0);
24 return true; 28 return true;
25 }; 29 };
26 </script> 30 </script>
27 </head> 31 </head>
28 <body> 32 <body>
29 <iframe onload="test(this)" src="resources/onclick.html"></iframe> 33 <iframe onload="test(this)" src="resources/onclick.html"></iframe>
30 </body> 34 </body>
31 </html> 35 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/platform/linux/storage/websql/sql-error-codes-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698