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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/resources/inspector-protocol-test.js

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: Created 3 years, 6 months 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: 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}`);

Powered by Google App Engine
This is Rietveld 408576698