Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-invalid-call.html |
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-invalid-call.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-invalid-call.html |
index 8cc9d6d9170d79b0ade6670871cd3b1b8c833834..cf52baa70b18b675c444f2f904cd6329cccc32bb 100644 |
--- a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-invalid-call.html |
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-invalid-call.html |
@@ -28,6 +28,16 @@ test(function() { |
}); |
}, "Calling OffscreenCanvas.commit() on main without transferControlToOffscreen throws exception."); |
+test(function() { |
+ var offscreenCanvas = new OffscreenCanvas(50, 50); |
+ var gl = offscreenCanvas.getContext("webgl"); |
+ gl.clearColor(1.0, 0.0, 0.0, 1.0); |
+ gl.clear(gl.COLOR_BUFFER_BIT); |
+ assert_throws("InvalidStateError", function() { |
+ gl.commit(); |
+ }); |
+}, "Calling WebGL's commit() on main without transferControlToOffscreen throws exception."); |
+ |
async_test(function() { |
var worker = makeWorker(document.getElementById("myWorker").textContent); |
worker.onmessage = this.step_func(function (e) { |