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'
>
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.");
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
);