blob: 4d4137e2d3c63c0ab9161ec5f25e1177d83fd862 [file] [log] [blame]
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.webgpuaccess.getTextureFormat.rgba8.tentative.https
// Description:getTextureFormat() returns RGBA8 or BGRA8 for a typical context
// Note:
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
var t = async_test("getTextureFormat() returns RGBA8 or BGRA8 for a typical context");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
var canvas = new OffscreenCanvas(100, 50);
var ctx = canvas.getContext('2d');
assert_regexp_match(ctx.getTextureFormat(), /^rgba8unorm|bgra8unorm$/);
t.done();
});
done();