https://github.com/web-platform-tests/wpt
Raw File
Tip revision: beb53fc12894d91cb6ff2380ea0e87608044e64e authored by Philip Jägenstedt on 20 December 2018, 16:25:34 UTC
Remove "Uninstall Python packages" step
Tip revision: beb53fc
common.js
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.");
}
back to top