Bug 1232864 - Hotfix test on a CLOSED TREE

This commit is contained in:
Jeff Gilbert 2015-12-16 16:13:21 -08:00
parent 34eeb80550
commit 1b8ce0a596

View File

@ -1,20 +1,36 @@
<!DOCTYPE HTML>
<html>
<head>
<title>WebGL test: WebGL2RenderingContext not exposed</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
<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>
var exposed = false;
try {
null instanceof WebGL2RenderingContext;
exposed = true;
} catch (e) {}
function ShouldExpose() {
try {
return SpecialPowers.getBoolPref('webgl.enable-prototype-webgl2');
} catch (e) {}
ok(!exposed, 'WebGL2RenderingContext should not be exposed.');
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>