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

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: rebased 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..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}`);

Powered by Google App Engine
This is Rietveld 408576698