test_privileged_exts.html (630B)
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="driver-info.js"></script> 8 </head> 9 <body> 10 <canvas id="c"></canvas> 11 <script> 12 13 function TestExt(gl, name) { 14 var ext = gl.getExtension(name); 15 ok(!ext, 'Should not have access to \'' + name + '\'.'); 16 } 17 18 (function() { 19 var gl = c.getContext('webgl'); 20 if (!gl) { 21 todo(gl, 'Get GL working here first.'); 22 return; 23 } 24 25 // Privileged extensions: 26 TestExt(gl, 'MOZ_debug'); 27 })(); 28 29 </script> 30 </body> 31 </html>