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

Unified Diff: LayoutTests/resources/js-test.js

Issue 243523003: Fire window.onerror for uncaught IndexedDB errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove FIXMEs Created 6 years, 6 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
Index: LayoutTests/resources/js-test.js
diff --git a/LayoutTests/resources/js-test.js b/LayoutTests/resources/js-test.js
index 7f45c0dd51687fe1a9da4bbc4dff8e46a0f35d0b..72aebe776f2c8b99453c0b9bccbe2d2c25eb52b3 100644
--- a/LayoutTests/resources/js-test.js
+++ b/LayoutTests/resources/js-test.js
@@ -10,7 +10,7 @@ var isJsTest = true;
var description, debug, successfullyParsed;
-var expectingError; // set by shouldHaveError()
+var expectingError; // set by expectError()
var expectedErrorMessage; // set by onerror when expectingError is true
var unexpectedErrorMessage; // set by onerror when expectingError is not true
@@ -103,7 +103,8 @@ var unexpectedErrorMessage; // set by onerror when expectingError is not true
if (self.expectingError) {
self.expectedErrorMessage = message;
self.expectingError = false;
- return;
+ // Consume expected error in worker, so window doesn't fail the test.
+ return isWorker();
}
self.unexpectedErrorMessage = message;
if (self.jsTestIsAsync) {
@@ -657,7 +658,7 @@ function shouldBeNow(a, delta)
function expectError()
{
if (expectingError) {
- testFailed("shouldHaveError() called twice before an error occurred!");
+ testFailed("expectError() called twice before an error occurred!");
}
expectingError = true;
}

Powered by Google App Engine
This is Rietveld 408576698