summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/canvas/offscreen/layers
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/canvas/offscreen/layers')
-rw-r--r--testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.html11
-rw-r--r--testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.worker.js11
-rw-r--r--testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js2
-rw-r--r--testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js2
4 files changed, 4 insertions, 22 deletions
diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.html
index 867553b45e..cebdfd5f27 100644
--- a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.html
+++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.html
@@ -10,13 +10,7 @@
<script>
-var t = async_test("Tests that layers ignore the global context filter.");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
-
+test(t => {
var canvas = new OffscreenCanvas(100, 50);
var ctx = canvas.getContext('2d');
@@ -51,7 +45,6 @@ t.step(function() {
_assertSame(ctx.shadowOffsetX, 10, "ctx.shadowOffsetX", "10");
_assertSame(ctx.shadowOffsetY, 20, "ctx.shadowOffsetY", "20");
_assertSame(ctx.shadowBlur, 30, "ctx.shadowBlur", "30");
- t.done();
-});
+}, "Tests that layers ignore the global context filter.");
</script>
diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.worker.js
index 5c2bb73e8f..a566cccf14 100644
--- a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.worker.js
+++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.worker.js
@@ -6,13 +6,7 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("Tests that layers ignore the global context filter.");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
-
+test(t => {
var canvas = new OffscreenCanvas(100, 50);
var ctx = canvas.getContext('2d');
@@ -47,6 +41,5 @@ t.step(function() {
_assertSame(ctx.shadowOffsetX, 10, "ctx.shadowOffsetX", "10");
_assertSame(ctx.shadowOffsetY, 20, "ctx.shadowOffsetY", "20");
_assertSame(ctx.shadowBlur, 30, "ctx.shadowBlur", "30");
- t.done();
-});
+}, "Tests that layers ignore the global context filter.");
done();
diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js
index be0f4f2cde..8361e19108 100644
--- a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js
+++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js
@@ -7,7 +7,6 @@ importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
promise_test(async t => {
-
var canvas = new OffscreenCanvas(200, 200);
var ctx = canvas.getContext('2d');
@@ -18,6 +17,5 @@ promise_test(async t => {
// Calling again inside a layer should throw.
ctx.beginLayer();
await promise_rejects_dom(t, 'InvalidStateError', canvas.convertToBlob());
- t.done();
}, "Check that exceptions are thrown for operations that are malformed while layers are open.");
done();
diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js
index b286b7a9e7..d64f693864 100644
--- a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js
+++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js
@@ -7,7 +7,6 @@ importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
promise_test(async t => {
-
var canvas = new OffscreenCanvas(200, 200);
var ctx = canvas.getContext('2d');
@@ -18,6 +17,5 @@ promise_test(async t => {
// Calling again inside a layer should throw.
ctx.beginLayer();
await promise_rejects_dom(t, 'InvalidStateError', createImageBitmap(canvas));
- t.done();
}, "Check that exceptions are thrown for operations that are malformed while layers are open.");
done();