1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/canvas/test/webgl-mochitest/test_privileged_exts.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,32 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 +<title>WebGL test: Check for privileged ext access.</title> 1.8 +<script src="/tests/SimpleTest/SimpleTest.js"></script> 1.9 +<link rel="stylesheet" href="/tests/SimpleTest/test.css"> 1.10 +<script src="webgl-util.js"></script> 1.11 +<script src="driver-info.js"></script> 1.12 +</head> 1.13 +<body> 1.14 +<canvas id="c"></canvas> 1.15 +<script> 1.16 + 1.17 +function TestExt(gl, name) { 1.18 + var ext = gl.getExtension(name); 1.19 + ok(!ext, 'Should not have access to \'' + name + '\'.'); 1.20 +} 1.21 + 1.22 +(function() { 1.23 + var gl = WebGLUtil.getWebGL('c'); 1.24 + if (!gl) { 1.25 + todo(gl, 'Get GL working here first.'); 1.26 + return; 1.27 + } 1.28 + 1.29 + // Privileged extensions: 1.30 + TestExt(gl, 'WEBGL_debug_renderer_info'); 1.31 +})(); 1.32 + 1.33 +</script> 1.34 +</body> 1.35 +</html>