Revision c5719e00d4a7c1e336ae3f047ed5381c159c840d authored by James Graham on 14 March 2018, 15:05:06 UTC, committed by James Graham on 14 March 2018, 15:09:15 UTC
Typically no tests completing means that some error occured, or the user
supplied an invalid test path. In either case we should log the
problem and return a failure code.
1 parent 716fa06
Raw File
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