<!DOCTYPE html> | |
<script src="/resources/testharness.js"></script> | |
<script src="/resources/testharnessreport.js"></script> | |
<script src="/common/canvas-tests.js"></script> | |
<link rel="help" href="https://html.spec.whatwg.org/#dom-offscreencanvas"> | |
<script> | |
test(function() { | |
let offscreenCanvas = new OffscreenCanvas(100, 100); | |
let gl = offscreenCanvas.getContext("webgl"); | |
assert_true(gl instanceof WebGLRenderingContext); | |
assert_equals(gl.canvas, offscreenCanvas); | |
}, "Test getContext('webgl')."); | |
</script> | |