Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-invalid-call.html

Issue 2328463004: Implement WebGL's commit on the main thread (Closed)
Patch Set: address junov@'s comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698