chromium/third_party/blink/web_tests/images/webgl-teximage2d.html

<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../fast/webgl/resources/webgl-test.js"></script>
<canvas width="0" height="0"> </canvas>
<img width="0" height="0"></img>
<script>
async_test(function(t) {
    var gl = create3DContext(document.querySelector("canvas"));
    var img = document.querySelector("img");
    img.onload = t.step_func_done(function() {
        var texture = gl.createTexture();
        gl.bindTexture(gl.TEXTURE_2D, texture);
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img);
        assert_equals(gl.getError(), gl.NO_ERROR);
    });
    img.src = "resources/green.jpg";
});
</script>