Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / canvas / test / webgl-mochitest / test_webgl2_not_exposed.html
blobd8d2f54c0d106d6acccdde861cfdb742be66516b
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>WebGL test: WebGL2RenderingContext only exposed when appropriate</title>
5 <script src='/tests/SimpleTest/SimpleTest.js'></script>
6 <link rel='stylesheet' href='/tests/SimpleTest/test.css'>
7 </head>
8 <body>
9 <script>
11 function ShouldExpose() {
12 try {
13 return SpecialPowers.getBoolPref('webgl.enable-webgl2');
14 } catch (e) {}
16 return false;
19 function DoesExpose() {
20 try {
21 null instanceof WebGL2RenderingContext;
22 return true;
23 } catch (e) {}
25 return false;
28 var doesExpose = DoesExpose();
29 if (ShouldExpose()) {
30 ok(doesExpose, 'WebGL2RenderingContext should be exposed.');
31 } else {
32 ok(!doesExpose, 'WebGL2RenderingContext should not be exposed.');
35 </script>
36 </body>
37 </html>