summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/mozilla/tests/webgpu/common/framework/fixture.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/mozilla/tests/webgpu/common/framework/fixture.js')
-rw-r--r--testing/web-platform/mozilla/tests/webgpu/common/framework/fixture.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/testing/web-platform/mozilla/tests/webgpu/common/framework/fixture.js b/testing/web-platform/mozilla/tests/webgpu/common/framework/fixture.js
index d64245f5f8..149226a6e2 100644
--- a/testing/web-platform/mozilla/tests/webgpu/common/framework/fixture.js
+++ b/testing/web-platform/mozilla/tests/webgpu/common/framework/fixture.js
@@ -17,6 +17,7 @@ export { TestCaseRecorder } from '../internal/logging/test_case_recorder.js';
+
export class SubcaseBatchState {
constructor(
recorder,
@@ -124,8 +125,12 @@ export class Fixture {
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 {
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) {
+ this.rec.info(new Error(msg));
+ }
+
/** Throws an exception marking the subcase as skipped. */
skip(msg) {
throw new SkipTestCase(msg);