https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 8d9511f490f0dc163cbc428a1fb63764b02b391e authored by Robin Berjon on 17 April 2014, 10:42:34 UTC
remove testing relying on detach() since that is now supposed to do nothing
Tip revision: 8d9511f
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