diff options
Diffstat (limited to 'dom/webgpu/tests/cts/checkout/src/common/framework/fixture.ts')
-rw-r--r-- | dom/webgpu/tests/cts/checkout/src/common/framework/fixture.ts | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/dom/webgpu/tests/cts/checkout/src/common/framework/fixture.ts b/dom/webgpu/tests/cts/checkout/src/common/framework/fixture.ts index 77875e047d..616023e20c 100644 --- a/dom/webgpu/tests/cts/checkout/src/common/framework/fixture.ts +++ b/dom/webgpu/tests/cts/checkout/src/common/framework/fixture.ts @@ -15,7 +15,8 @@ export type TestParams = { type DestroyableObject = | { destroy(): void } | { close(): void } - | { getExtension(extensionName: 'WEBGL_lose_context'): WEBGL_lose_context }; + | { getExtension(extensionName: 'WEBGL_lose_context'): WEBGL_lose_context } + | HTMLVideoElement; export class SubcaseBatchState { constructor( @@ -124,8 +125,12 @@ export class Fixture<S extends SubcaseBatchState = SubcaseBatchState> { if (WEBGL_lose_context) WEBGL_lose_context.loseContext(); } else if ('destroy' in o) { o.destroy(); - } else { + } else if ('close' in o) { o.close(); + } else { + // HTMLVideoElement + o.src = ''; + o.srcObject = null; } } } @@ -161,6 +166,14 @@ export class Fixture<S extends SubcaseBatchState = SubcaseBatchState> { this.rec.debug(new Error(msg)); } + /** + * Log an info message. + * **Use sparingly. Use `debug()` instead if logs are only needed with debug logging enabled.** + */ + info(msg: string): void { + this.rec.info(new Error(msg)); + } + /** Throws an exception marking the subcase as skipped. */ skip(msg: string): never { throw new SkipTestCase(msg); |