pname;
        var param = testCases[ii].param;
        wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.samplerParameterf(s, " + pname + ", " + param + ")");
        shouldBe("gl.getSamplerParameter(s, " + pname + ")", param.toString());
        wtu.glErrorShouldBe(gl, gl.NO_ERROR);
    }

    debug("Checking invalid pname and param");

    testCases = [
      { pname: gl.TEXTURE_IMMUTABLE_FORMAT,  param: null,  expectedError: gl.INVALID_ENUM },
      { pname: gl.TEXTURE_BASE_LEVEL,  param: null,  expectedEr