mirror of
https://github.com/Basilisk-Development-Team/UXP-mirror.git
synced 2026-11-13 12:52:02 -05:00
14 lines
377 B
JavaScript
14 lines
377 B
JavaScript
function getGl() {
|
|
var c = document.createElement("canvas");
|
|
var gl = c.getContext("experimental-webgl");
|
|
assert_true(!!gl, "Should be able to get a context.");
|
|
return gl;
|
|
}
|
|
|
|
function shouldGenerateGLError(cx, glError, fn) {
|
|
test(function() {
|
|
fn();
|
|
assert_equals(cx.getError(), glError);
|
|
}, "Calling " + fn + " should generate a " + glError + " error.");
|
|
}
|