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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html

Issue 1881563003: Implement OffscreenCanvas.getContext('webgl') (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and remove static_cast Created 4 years, 8 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-getContext-in-worker.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html
similarity index 72%
rename from third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker.html
rename to third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html
index e555fa97de262f9322e8950a943ddb5a3c41e0bf..91a3fd01f4d86616ba74f92378d00a878319f1a3 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html
@@ -5,10 +5,15 @@
<script id="myWorker" type="text/worker">
self.onmessage = function(e) {
var aCanvas = new OffscreenCanvas(50, 50);
+ var bCanvas = new OffscreenCanvas(50, 50);
try {
- var ctx = aCanvas.getContext('2d');
- if (toString.call(ctx) != '[object OffscreenCanvasRenderingContext2D]') {
+ var ctx1 = aCanvas.getContext('2d');
+ //TODO(crbug.com/602391): implement get webgl context in worker
+ var ctx2 = bCanvas.getContext('webgl');
+ if (toString.call(ctx1) != '[object OffscreenCanvasRenderingContext2D]') {
self.postMessage("aCanvas.getContext('2d') does not return [object OffscreenCanvasRenderingContext2D]");
+ } else if (toString.call(ctx2) != '[object Null]') {
+ self.postMessage("bCanvas.getContext('webgl') does not return [object Null]");
} else {
self.postMessage("success");
}

Powered by Google App Engine
This is Rietveld 408576698