[offset + 4] = quad + 1;
        indices[offset + 5] = quad + 3;
    }
    var indexObject = gl.createBuffer();
    gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexObject);
    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, drawType);
    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after setting up indices");
    gl.drawElements(gl.TRIANGLES, numQuads * 6, gl.UNSIGNED_INT, 0);
    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after drawing");
}

function runCrashWithBufferSubDataTests(drawType) {
    debug('Verifies that th