Index: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/the-offscreen-canvas/size.attributes.idl.set.zero.worker.js |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/the-offscreen-canvas/size.attributes.idl.set.zero.worker.js b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/the-offscreen-canvas/size.attributes.idl.set.zero.worker.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d321095b49674b38c4bee31c7dad7ef860cc6fbf |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/the-offscreen-canvas/size.attributes.idl.set.zero.worker.js |
@@ -0,0 +1,23 @@ |
+// DO NOT EDIT! This test has been generated by tools/gentest.py. |
+// OffscreenCanvas test in a worker:size.attributes.idl.set.zero |
+// Description:Setting width/height IDL attributes to 0 |
+// Note: |
+ |
+importScripts("/resources/testharness.js"); |
+importScripts("/common/canvas-tests.js"); |
+ |
+var t = async_test("Setting width/height IDL attributes to 0"); |
+t.step(function() { |
+ |
+var offscreenCanvas = new OffscreenCanvas(100, 50); |
+var ctx = offscreenCanvas.getContext('2d'); |
+ |
+offscreenCanvas.width = 0; |
+offscreenCanvas.height = 0; |
+_assertSame(offscreenCanvas.width, 0, "offscreenCanvas.width", "0"); |
+_assertSame(offscreenCanvas.height, 0, "offscreenCanvas.height", "0"); |
+ |
+t.done(); |
+ |
+}); |
+done(); |