diff --git a/resources/benchmark-runner.mjs b/resources/benchmark-runner.mjs index b9741199d..8b84c7fda 100644 --- a/resources/benchmark-runner.mjs +++ b/resources/benchmark-runner.mjs @@ -409,7 +409,8 @@ export class BenchmarkRunner { async runSuite(suite) { // FIXME: Encapsulate more state in the SuiteRunner. // FIXME: Return and use measured values from SuiteRunner. - const suiteRunner = new SuiteRunner(this._measuredValues, this._frame, this._page, this._client, suite); + const suiteRunnerClass = SUITE_RUNNER_LOOKUP[suite.type ?? "default"]; + const suiteRunner = new suiteRunnerClass(this._measuredValues, this._frame, this._page, this._client, suite); await suiteRunner.run(); } @@ -622,3 +623,12 @@ export class SuiteRunner { await this._client.didRunTest(this._suite, test); } } + +// FIXME: implement remote steps +class RemoteSuiteRunner extends SuiteRunner {} + +const SUITE_RUNNER_LOOKUP = { + __proto__: null, + default: SuiteRunner, + remote: RemoteSuiteRunner, +};