Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / canvas / test / webgl-mochitest / test_has_rbab.html
blobbc60f2deaf78b0201e5fd9712489f970acd3426f
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset='UTF-8'>
5 <title>Fail without robust_buffer_access_behavior</title>
6 <script src='/tests/SimpleTest/SimpleTest.js'></script>
7 <link rel='stylesheet' href='/tests/SimpleTest/test.css'>
8 </head>
9 <body>
10 <script>
12 function AssertRBAB() {
13 const c = document.createElement('canvas');
14 const g = c.getContext('webgl');
15 const e = g.getExtension('MOZ_debug');
16 ok(e, 'Should have MOZ_debug.');
18 const does_index_validation = e.getParameter(e.DOES_INDEX_VALIDATION);
19 const err = g.getError();
20 ok(!err, 'Error should be 0, was 0x' + err.toString(16));
21 ok(!does_index_validation,
22 "Should have RBAB. Mark this test as failing on platforms that can't support it.");
24 SimpleTest.finish();
27 // -
29 SimpleTest.waitForExplicitFinish();
31 const prefPairList = [
32 ['webgl.force-enabled', true],
33 ['webgl.enable-privileged-extensions', true],
35 const prefEnv = {'set': prefPairList};
36 SpecialPowers.pushPrefEnv(prefEnv, AssertRBAB);
38 </script>
39 </body>
40 </html>