content/canvas/test/webgl-mochitest/test_privileged_exts.html

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:dc3b26153498
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>WebGL test: Check for privileged ext access.</title>
5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
7 <script src="webgl-util.js"></script>
8 <script src="driver-info.js"></script>
9 </head>
10 <body>
11 <canvas id="c"></canvas>
12 <script>
13
14 function TestExt(gl, name) {
15 var ext = gl.getExtension(name);
16 ok(!ext, 'Should not have access to \'' + name + '\'.');
17 }
18
19 (function() {
20 var gl = WebGLUtil.getWebGL('c');
21 if (!gl) {
22 todo(gl, 'Get GL working here first.');
23 return;
24 }
25
26 // Privileged extensions:
27 TestExt(gl, 'WEBGL_debug_renderer_info');
28 })();
29
30 </script>
31 </body>
32 </html>

mercurial