4 <title>WebGL test: Check that WebGL works (or not) if it should (or should not).
</title>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css">
7 <script src=
"driver-info.js"></script>
10 <canvas id=
"c"></canvas>
14 ok(SpecialPowers
.getBoolPref('webgl.force-enabled'), 'WebGL should be force-enabled.');
16 var shouldSucceed
= true;
17 var shouldFail
= false;
19 if (DriverInfo
.getOS() == DriverInfo
.OS
.ANDROID
&&
20 DriverInfo
.getOSVersion() < 15)
22 // Consider 'random'. Actually, ARMv6 fails, and ARMv7 succeeds, but we have
23 // not been successful at determining this from JS. (see bug 917478)
24 shouldSucceed
= false;
28 var gl
= c
.getContext('webgl');
30 ok(gl
, 'Expected WebGL creation to succeed.');
33 ok(!gl
, 'Expected WebGL creation to fail.');
39 SimpleTest
.waitForExplicitFinish();
42 ['webgl.force-enabled', true]
44 var prefEnv
= {'set': prefArrArr
};
45 SpecialPowers
.pushPrefEnv(prefEnv
, test
);