1
0
Fork 0
firefox/dom/canvas/test/webgl-mochitest/test_webgl2_not_exposed.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

37 lines
733 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<title>WebGL test: WebGL2RenderingContext only exposed when appropriate</title>
<script src='/tests/SimpleTest/SimpleTest.js'></script>
<link rel='stylesheet' href='/tests/SimpleTest/test.css'>
</head>
<body>
<script>
function ShouldExpose() {
try {
return SpecialPowers.getBoolPref('webgl.enable-webgl2');
} catch (e) {}
return false;
}
function DoesExpose() {
try {
null instanceof WebGL2RenderingContext;
return true;
} catch (e) {}
return false;
}
var doesExpose = DoesExpose();
if (ShouldExpose()) {
ok(doesExpose, 'WebGL2RenderingContext should be exposed.');
} else {
ok(!doesExpose, 'WebGL2RenderingContext should not be exposed.');
}
</script>
</body>
</html>