From cc490658655c9ca03d379bb11d950c171325828d Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Tue, 22 Oct 2024 17:38:01 +0200 Subject: [PATCH 1/2] add summy suite runner classes --- resources/benchmark-runner.mjs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/resources/benchmark-runner.mjs b/resources/benchmark-runner.mjs index 61c818b46..242dc4e0c 100644 --- a/resources/benchmark-runner.mjs +++ b/resources/benchmark-runner.mjs @@ -457,7 +457,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(); } @@ -663,3 +664,16 @@ export class SuiteRunner { await this._client.didRunTest(suite, test); } } + +// FIXME: implement async steps +class AsyncSuiteRunner extends SuiteRunner {} + +// FIXME: implement remote steps +class RemoteSuiteRunner extends SuiteRunner {} + +const SUITE_RUNNER_LOOKUP = { + __proto__: null, + default: SuiteRunner, + async: AsyncSuiteRunner, + remote: RemoteSuiteRunner, +}; From 1ce36c6e9c3d6b98e7404d9d091d748484aee7ea Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Wed, 23 Oct 2024 17:59:05 +0200 Subject: [PATCH 2/2] remove stub AsyncSuiteRunner --- resources/benchmark-runner.mjs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/resources/benchmark-runner.mjs b/resources/benchmark-runner.mjs index 242dc4e0c..0e180e5f2 100644 --- a/resources/benchmark-runner.mjs +++ b/resources/benchmark-runner.mjs @@ -665,15 +665,11 @@ export class SuiteRunner { } } -// FIXME: implement async steps -class AsyncSuiteRunner extends SuiteRunner {} - // FIXME: implement remote steps class RemoteSuiteRunner extends SuiteRunner {} const SUITE_RUNNER_LOOKUP = { __proto__: null, default: SuiteRunner, - async: AsyncSuiteRunner, remote: RemoteSuiteRunner, };