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

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: Include error name Created 6 years, 8 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 985f49f60213af05b1b00cecc02f42134f2cdeb7..726ffbd45074e3eff5ee8419acb8c28ed2e65716 100644
--- a/LayoutTests/resources/js-test.js
+++ b/LayoutTests/resources/js-test.js
@@ -8,7 +8,7 @@ if (self.testRunner) {
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
@@ -101,7 +101,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) {
@@ -631,7 +632,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