Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / canvas / test / webgl-mochitest / test_fb_param_crash.html
blob4046309ba6d717c5e5884702fd1a21e333ee319f
1 <!DOCTYPE HTML>
2 <title>WebGL test: bug 958723</title>
3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
4 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
5 <script src="driver-info.js"></script>
6 <body>
7 <canvas id="c"></canvas>
8 <script>
10 // Give ourselves a scope to return early from:
11 (function() {
12 var gl = c.getContext('webgl');
13 if (!gl) {
14 todo(false, 'WebGL is unavailable.');
15 return;
18 function checkGLError(func, info, reference) {
19 var error = gl.getError();
20 var prefix = info ? ('[' + info + '] ') : '';
21 var text = 'gl.getError should be 0x' + reference.toString(16) +
22 ', was 0x' + error.toString(16) + '.';
23 func(error == reference, prefix + text);
26 // Begin test:
27 if (!gl.getExtension('WEBGL_draw_buffers')) {
28 todo(false, 'Not having this extension is fine.');
29 return;
31 checkGLError(ok, 'before bad param query', 0);
33 var result = gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER,
34 gl.COLOR_ATTACHMENT0,
35 gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);
37 checkGLError(ok, 'after bad param query', gl.INVALID_OPERATION);
38 })();
40 </script>