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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html

Issue 1660073002: Fix fast/events/before-unload-return-bad-value.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html b/third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html
index 94cf8da53feacf17fcfe061f8da1ed635405728f..f97e9042e3292e51852c5bc94e555ae43048eaa9 100644
--- a/third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html
+++ b/third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html
@@ -6,6 +6,7 @@
description("Tests that an exception is thrown when the value returned in the beforeunload callback cannot be converted to a String");
window.jsTestIsAsync = true;
+var testMessage;
var alreadyTested = false;
function test(frame) {
if (alreadyTested)
@@ -16,18 +17,16 @@ function test(frame) {
return {toString: function() { throw "Exception in toString()"; }};
};
+ frame.contentWindow.onerror = function(msg) {
+ testMessage = msg;
+ testPassed("Exception was thrown");
+ shouldBeEqualToString("testMessage", "Uncaught Exception in toString()");
+ return true;
+ };
+
frame.contentWindow.location.href = "resources/does-not-exist.html";
setTimeout(finishJSTest, 0);
}
-
-var testMessage;
-window.onerror = function(msg) {
- testMessage = msg;
- // FIXME: This test fails. See crbug.com/446147.
- testPassed("Exception was thrown");
- shouldBeEqualToString("testMessage", "Uncaught Exception in toString()");
- return true;
-};
</script>
</head>
<body>
« no previous file with comments | « no previous file | third_party/WebKit/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