|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <head> |
|
4 <title>WebGL test: 'webgl' context request</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 </head> |
|
9 <body> |
|
10 <canvas id="c"></canvas> |
|
11 <script> |
|
12 |
|
13 var gl = WebGLUtil.getWebGL('c', true); |
|
14 |
|
15 var isMobile = /Mobile/.test(navigator.userAgent); |
|
16 var isTablet = /Tablet/.test(navigator.userAgent); |
|
17 var shouldBeConformant = !isMobile && !isTablet; |
|
18 |
|
19 if (shouldBeConformant) { |
|
20 // Desktop. |
|
21 ok(gl, 'Expected conformance on: ' + navigator.userAgent); |
|
22 } else { |
|
23 // Fennec, B2G. |
|
24 ok(!gl, 'Expected no conformance on: ' + navigator.userAgent); |
|
25 } |
|
26 |
|
27 </script> |
|
28 </body> |
|
29 </html> |