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

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

Issue 58533003: Move fast/js/resources files to resources. (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="../../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 function test(frame) { 9 function test(frame) {
10 frame.contentWindow.onbeforeunload = function(event) { 10 frame.contentWindow.onbeforeunload = function(event) {
11 return {toString: function() { throw "Exception in toString()"; }}; 11 return {toString: function() { throw "Exception in toString()"; }};
12 }; 12 };
13 13
14 frame.contentWindow.location.href = "resources/does-not-exist.html"; 14 frame.contentWindow.location.href = "resources/does-not-exist.html";
15 setTimeout(finishJSTest, 0); 15 setTimeout(finishJSTest, 0);
16 } 16 }
17 17
18 var testMessage; 18 var testMessage;
19 window.onerror = function(msg) { 19 window.onerror = function(msg) {
20 testMessage = msg; 20 testMessage = msg;
21 testPassed("Exception was thrown"); 21 testPassed("Exception was thrown");
22 shouldBeEqualToString("testMessage", "Uncaught Exception in toString()"); 22 shouldBeEqualToString("testMessage", "Uncaught Exception in toString()");
23 setTimeout(finishJSTest, 0); 23 setTimeout(finishJSTest, 0);
24 return true; 24 return true;
25 }; 25 };
26 </script> 26 </script>
27 </head> 27 </head>
28 <body> 28 <body>
29 <iframe onload="test(this)" src="resources/onclick.html"></iframe> 29 <iframe onload="test(this)" src="resources/onclick.html"></iframe>
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698