Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html |
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html |
index 91a3fd01f4d86616ba74f92378d00a878319f1a3..706181e3e81e2e79f31aae7783bff2acb4c45ed1 100644 |
--- a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html |
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html |
@@ -8,11 +8,10 @@ self.onmessage = function(e) { |
var bCanvas = new OffscreenCanvas(50, 50); |
try { |
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]') { |
+ } else if (toString.call(ctx2) != '[object WebGLRenderingContext]') { |
self.postMessage("bCanvas.getContext('webgl') does not return [object Null]"); |
} else { |
self.postMessage("success"); |
@@ -25,7 +24,7 @@ self.onmessage = function(e) { |
<script> |
jsTestIsAsync = true; |
-description("Tests that the 2D context of OffscreenCanvas can be constructed on a worker thread."); |
+description("Tests that the 2D and webgl context of OffscreenCanvas can be constructed on a worker thread."); |
function makeWorker(script) { |
var blob = new Blob([script]); |
@@ -35,7 +34,7 @@ function makeWorker(script) { |
function handleMessageFromWorker(msg) |
{ |
if (msg.data == "success") { |
- testPassed("getContext('2d') correctly returns [object OffscreenCanvasRenderingContext2D]."); |
+ testPassed("getContext('2d') and getContext('webgl') works on a worker thread"); |
} else { |
testFailed(msg.data); |
} |