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

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: Don't capture full stack unless devtools is visible Created 6 years 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 58d29ea718380faf1190d7eb719313b42bc42923..1d9a865cb2105729eef6d2a9c0ab6f0bcdd24573 100644
--- a/LayoutTests/resources/js-test.js
+++ b/LayoutTests/resources/js-test.js
@@ -15,7 +15,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
@@ -112,7 +112,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) {
@@ -666,7 +667,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