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

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

Issue 2271593002: Convert OffscreenCanvas-getContext tests to testharness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed test as per the comments. Created 4 years, 4 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.js
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.js b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..aaaaf60cf3bbf364a83370e72385d534caca2c79
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.js
@@ -0,0 +1,10 @@
+importScripts("../../resources/testharness.js");
fs 2016/08/25 08:14:58 Could possibly put this file in a resources/ or sc
+test(function() {
+ var aCanvas = new OffscreenCanvas(50, 50);
+ var bCanvas = new OffscreenCanvas(50, 50);
+ var ctx1 = aCanvas.getContext('2d');
+ var ctx2 = bCanvas.getContext('webgl');
+ assert_true(ctx1 instanceof OffscreenCanvasRenderingContext2D);
+ assert_true(ctx2 instanceof WebGLRenderingContext);
+});
+done();

Powered by Google App Engine
This is Rietveld 408576698