ladybird/Tests/LibWeb/Text/input/canvas/webgl-create-canvas.html
2024-12-06 15:35:36 +01:00

17 lines
760 B
HTML

<!doctype html>
<script src="../include.js"></script>
<script>
test(() => {
println("FIXME: This test relies on having a GPU backend enabled, which it is not in run-tests mode :(");
let canvas = document.createElement("canvas");
let context = canvas.getContext("webgl");
println(`context instanceof WebGLRenderingContext: ${context instanceof WebGLRenderingContext}`);
println(`context is null: ${context === null}`);
let canvas2 = document.createElement("canvas");
let context2 = canvas2.getContext("webgl2");
println(`context2 instanceof WebGL2RenderingContext: ${context2 instanceof WebGL2RenderingContext}`);
println(`context2 is null: ${context2 === null}`);
});
</script>