test_has_rbab.html (1010B)
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> 11 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.'); 17 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."); 23 24 SimpleTest.finish(); 25 } 26 27 // - 28 29 SimpleTest.waitForExplicitFinish(); 30 31 const prefPairList = [ 32 ['webgl.force-enabled', true], 33 ['webgl.enable-privileged-extensions', true], 34 ]; 35 const prefEnv = {'set': prefPairList}; 36 SpecialPowers.pushPrefEnv(prefEnv, AssertRBAB); 37 38 </script> 39 </body> 40 </html>