https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 8aa53dd361f53703c6c67c4b007a472832a855a2 authored by Marcos Cáceres on 22 November 2018, 02:14:30 UTC
fix: copy pasta
Tip revision: 8aa53dd
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