mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1232864 - Hotfix test on a CLOSED TREE
This commit is contained in:
parent
34eeb80550
commit
1b8ce0a596
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user