diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /dom/webgpu/tests/cts/checkout/src/common/framework/fixture.ts | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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); |