| 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 ccda7a9536991c889b8d9c187d28e8a693aa5846..93b5ca175e010d4b17260805fa34e379afdfd678 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,25 @@ var UnitTest = {};
|
| console.log(text);
|
| }
|
|
|
| + UnitTest.runTests = function(tests)
|
| + {
|
| + nextTest();
|
| +
|
| + function nextTest()
|
| + {
|
| + var test = tests.shift();
|
| + if (!test) {
|
| + UnitTest.completeTest();
|
| + return;
|
| + }
|
| + UnitTest.addResult("\ntest: " + test.name);
|
| + var testPromise = test();
|
| + if (!(testPromise instanceof Promise))
|
| + testPromise = Promise.resolve();
|
| + testPromise.then(nextTest);
|
| + }
|
| + }
|
| +
|
| function completeTestOnError(message, source, lineno, colno, error)
|
| {
|
| UnitTest.addResult("TEST ENDED IN ERROR: " + error.stack);
|
| @@ -93,4 +112,4 @@ var UnitTest = {};
|
|
|
| test();
|
| }
|
| -})();
|
| +})();
|
|
|