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..2c1b4719caf7dbcf6a4eed8ea6db19ff3060d4f4 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('FAIL: ' + message); |
+ this.completeTest(); |
+ } |
+ |
async loadScript(url) { |
var source = await this._fetch(this.url(url)); |
return eval(`${source}\n//# sourceURL=${url}`); |