| Index: third_party/WebKit/LayoutTests/http/tests/inspector-unit/inspector-unit-test.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/inspector-unit-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/inspector-unit-test.js
|
| index 5c656b18d64615f8cca4b62c34841be992d96131..ccda7a9536991c889b8d9c187d28e8a693aa5846 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/inspector-unit-test.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/inspector-unit-test.js
|
| @@ -56,6 +56,13 @@ var UnitTest = {};
|
| console.log(text);
|
| }
|
|
|
| + function completeTestOnError(message, source, lineno, colno, error)
|
| + {
|
| + UnitTest.addResult("TEST ENDED IN ERROR: " + error.stack);
|
| + UnitTest.completeTest();
|
| + }
|
| + window.onerror = completeTestOnError;
|
| +
|
| Runtime.startApplication("/inspector-unit/inspector-unit-test").then(runTest);
|
|
|
| function runTest()
|
| @@ -84,11 +91,6 @@ var UnitTest = {};
|
| WebInspector.inspectorView.showInitialPanel();
|
| rootView.attachToDocument(document);
|
|
|
| - try {
|
| - test();
|
| - } catch (e) {
|
| - UnitTest.addResult("TEST ENDED IN ERROR: " + e.stack);
|
| - UnitTest.completeTest();
|
| - }
|
| + test();
|
| }
|
| })();
|
|
|