| <script src="../../../resources/js-test-pre.js"></script> |
| var canvas = document.createElement("canvas"); |
| var context = canvas.getContext("webgl"); |
| shouldBe("context.getError()", "context.NO_ERROR"); |
| var buffer = context.createBuffer(); |
| shouldBe("context.getError()", "context.NO_ERROR"); |
| context.bindBuffer(context.ARRAY_BUFFER, buffer); |
| shouldBe("context.getError()", "context.NO_ERROR"); |
| shouldNotThrow(context.bufferData(context.ARRAY_BUFFER, new ArrayBuffer(10), context.STATIC_DRAW)); |
| shouldBe("context.getError()", "context.NO_ERROR"); |
| shouldNotThrow(context.bufferData(context.ARRAY_BUFFER, null, context.STATIC_DRAW)); |
| shouldBe("context.getError()", "context.INVALID_VALUE"); |
| shouldBe("context.getError()", "context.NO_ERROR"); |
| <script src="../../../resources/js-test-post.js"></script> |