Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector-protocol/resources/inspector-protocol-test.js |
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/resources/inspector-protocol-test.js b/third_party/WebKit/LayoutTests/inspector-protocol/resources/inspector-protocol-test.js |
| index 3c5c850559d06d7bfa813e942d9414f63222a412..1e800a24a573b2b5e6490481b49cb62e8aa3e5ce 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector-protocol/resources/inspector-protocol-test.js |
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/resources/inspector-protocol-test.js |
| @@ -92,6 +92,18 @@ var TestRunner = class { |
| return this._baseURL + relative; |
| } |
| + async runTestSuite(testSuite) { |
| + for (var test of testSuite) { |
| + this.log('\nRunning test: ' + test.name); |
| + try { |
| + await test(); |
| + } catch (e) { |
| + this.log(`Error during test: ${e}\n${e.stack}`); |
| + } |
| + } |
| + this.completeTest(); |
| + } |
| + |
| _checkExpectation(fail, name, messageObject) { |
| if (fail === !!messageObject.error) { |
| this.log('PASS: ' + name); |
| @@ -117,6 +129,11 @@ var TestRunner = class { |
| throw new Error(message); |
| } |
| + fail(message) { |
| + this.log(message); |
|
einbinder
2017/06/26 22:59:23
"Fail:" +
dgozman
2017/06/26 23:28:54
Done.
|
| + this.completeTest(); |
| + } |
| + |
| async loadScript(url) { |
| var source = await this._fetch(this.url(url)); |
| return eval(`${source}\n//# sourceURL=${url}`); |