Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / canvas / test / webgl-mochitest / test_webgl2_invalidate_framebuffer.html
blob6a384e1b9d1e0b502d40b237be66d4e7ad1ec866
1 <!DOCTYPE HTML>
2 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
4 <title>WebGL2 test: Framebuffers</title>
6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
8 <script src="driver-info.js"></script>
9 <script src="webgl-util.js"></script>
10 <body>
11 <canvas id="c" width="64" height="64"></canvas>
12 <script>
14 WebGLUtil.withWebGL2('c', function (gl) {
15 gl.invalidateFramebuffer(gl.FRAMEBUFFER, [gl.COLOR]);
16 ok(gl.getError() == 0, 'invalidateFramebuffer');
17 gl.invalidateSubFramebuffer(gl.FRAMEBUFFER, [gl.COLOR], 0, 0, 64, 64);
18 ok(gl.getError() == 0, 'invalidateSubFramebuffer');
19 gl.invalidateFramebuffer(gl.FRAMEBUFFER, [gl.GL_COLOR_ATTACHMENT0]);
20 ok(gl.getError() == gl.INVALID_ENUM, 'invalidateFrameBuffer should fail with GL_COLOR_ATTACHMENT on the default framebuffer');
21 }, function () {
22 SimpleTest.finish();
23 });
25 SimpleTest.waitForExplicitFinish();
27 </script>