diff options
Diffstat (limited to 'dom/webgpu/tests/cts/checkout/src/webgpu/web_platform/canvas/getPreferredCanvasFormat.spec.ts')
-rw-r--r-- | dom/webgpu/tests/cts/checkout/src/webgpu/web_platform/canvas/getPreferredCanvasFormat.spec.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/web_platform/canvas/getPreferredCanvasFormat.spec.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/web_platform/canvas/getPreferredCanvasFormat.spec.ts new file mode 100644 index 0000000000..0d966bc812 --- /dev/null +++ b/dom/webgpu/tests/cts/checkout/src/webgpu/web_platform/canvas/getPreferredCanvasFormat.spec.ts @@ -0,0 +1,19 @@ +export const description = ` +Tests for navigator.gpu.getPreferredCanvasFormat. +`; + +import { Fixture } from '../../../common/framework/fixture.js'; +import { makeTestGroup } from '../../../common/framework/test_group.js'; + +export const g = makeTestGroup(Fixture); + +g.test('value') + .desc( + ` + Ensure getPreferredCanvasFormat returns one of the valid values. + ` + ) + .fn(async t => { + const preferredFormat = navigator.gpu.getPreferredCanvasFormat(); + t.expect(preferredFormat === 'bgra8unorm' || preferredFormat === 'rgba8unorm'); + }); |