Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / canvas / test / webgl-mochitest / test_canvas_size.html
bloba9ea076a821de2eb362bc2d4b2b7a51c401b2345
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset='UTF-8'>
5 <script src='/tests/SimpleTest/SimpleTest.js'></script>
6 <link rel='stylesheet' href='/tests/SimpleTest/test.css'>
7 </head>
8 <title>WebGL test: Framebuffer maximum size test. (Bug 1290333)</title>
9 <body>
10 <script>
11 function TestSize(contextName, testSize) {
12 var attributes = {
13 antialias: false,
16 var canvas = document.createElement('canvas');
17 var gl = canvas.getContext(contextName, attributes);
19 if (!gl) {
20 todo(false, contextName + 'is unavailable.');
21 return;
23 gl.canvas.width = testSize;
24 gl.canvas.height = testSize;
26 ok(true, contextName + 'test complete.');
29 function run() {
30 TestSize('webgl', 16384);
31 TestSize('webgl2', 16384);
33 ok(true, 'Test complete.');
34 SimpleTest.finish();
37 ////////////////////////////////////////
39 SimpleTest.waitForExplicitFinish();
41 try {
42 var prefPairList = [
43 ['webgl.force-enabled', true],
45 var prefEnv = {'set': prefPairList};
46 SpecialPowers.pushPrefEnv(prefEnv, run);
47 } catch (e) {
48 warning('No SpecialPowers, but trying WebGL2 anyway...');
49 run();
52 </script>
53 </body>
54 </html>