Update WPT OffscreenCanvas test template

Follow up from cl:
https://chromium-review.googlesource.com/c/chromium/src/+/4304361. The
previous cl missed  to apply to many tests.

Change-Id: Id8c9dfd866f47e711ffc69a65ab7ed836ec1f21c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4306866
Commit-Queue: Yi Xu <yiyix@google.com>
Reviewed-by: Jean-Philippe Gravel <jpgravel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1113611}
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html
index 50c9cae..6975dda 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html
@@ -20,12 +20,12 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.clearRect(0, 0, 100, 50);
 _assertPixel(canvas, 50,25, 0,0,0,0);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html
index 75d4117..4d67a5f 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.beginPath();
@@ -30,7 +30,7 @@
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 16, 16);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html
index 3139dc3..f5c0e52 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html
@@ -20,13 +20,13 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.globalAlpha = 0.1;
 ctx.clearRect(0, 0, 100, 50);
 _assertPixel(canvas, 50,25, 0,0,0,0);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html
index f9623ef..f46245a 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html
@@ -20,13 +20,13 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.globalCompositeOperation = 'destination-atop';
 ctx.clearRect(0, 0, 100, 50);
 _assertPixel(canvas, 50,25, 0,0,0,0);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html
index 6e0e53e..ff96d1f 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.clearRect(0, 0, 50, 25);
@@ -31,7 +31,7 @@
 _assertPixel(canvas, 75,12, 0,0,0,0);
 _assertPixel(canvas, 25,37, 0,0,0,0);
 _assertPixel(canvas, 75,37, 0,0,0,0);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html
index 11339fe..24aa769 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.clearRect(Infinity, 0, 100, 50);
@@ -47,7 +47,7 @@
 ctx.clearRect(0, Infinity, 100, Infinity);
 ctx.clearRect(0, 0, Infinity, Infinity);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html
index 3356e64..e9716c9 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html
@@ -20,14 +20,14 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.beginPath();
 ctx.rect(0, 0, 100, 50);
 ctx.clearRect(0, 0, 16, 16);
 ctx.fill();
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html
index fff7101..904dfe9 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.shadowColor = '#f00';
@@ -29,7 +29,7 @@
 ctx.shadowOffsetY = 50;
 ctx.clearRect(0, -50, 100, 50);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html
index 2460285..a2ce63b 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html
@@ -20,14 +20,14 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.scale(10, 10);
 ctx.translate(0, 5);
 ctx.clearRect(0, -5, 10, 5);
 _assertPixel(canvas, 50,25, 0,0,0,0);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html
index 58fedbb..aaebbed 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html
@@ -20,14 +20,14 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.clearRect(0, 0, 100, 0);
 ctx.clearRect(0, 0, 0, 50);
 ctx.clearRect(0, 0, 0, 0);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html
index 47412b1..6d8e6c6 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html
@@ -20,11 +20,11 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html
index 85b7f15..5f38614 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.beginPath();
@@ -31,7 +31,7 @@
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 16, 16);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html
index e5672ec..7e59325 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.fillStyle = '#0f0';
@@ -32,7 +32,7 @@
 _assertPixel(canvas, 75,12, 0,255,0,255);
 _assertPixel(canvas, 25,37, 0,255,0,255);
 _assertPixel(canvas, 75,37, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html
index 50c05d4..e5b5be1 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.fillStyle = '#f00';
@@ -48,7 +48,7 @@
 ctx.fillRect(0, Infinity, 100, Infinity);
 ctx.fillRect(0, 0, Infinity, Infinity);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html
index a489b2e..2f83eec 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.beginPath();
 ctx.rect(0, 0, 100, 50);
 ctx.fillStyle = '#f00';
@@ -28,7 +28,7 @@
 ctx.fillStyle = '#0f0';
 ctx.fill();
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html
index 65f7c7c..f4dd0b2 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.shadowColor = '#0f0';
@@ -29,7 +29,7 @@
 ctx.shadowOffsetY = 50;
 ctx.fillRect(0, -50, 100, 50);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html
index eff17a4..900a5a7 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html
@@ -20,13 +20,13 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.scale(10, 10);
 ctx.translate(0, 5);
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, -5, 10, 5);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html
index d82975e..509b9b6 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.fillStyle = '#f00';
@@ -28,7 +28,7 @@
 ctx.fillRect(0, 0, 0, 50);
 ctx.fillRect(0, 0, 0, 0);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html
index 661343f..581c388 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html
@@ -20,12 +20,12 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.strokeStyle = '#0f0';
 ctx.lineWidth = 50;
 ctx.strokeRect(25, 24, 50, 2);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html
index 3eebc31..646be33 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.beginPath();
@@ -32,7 +32,7 @@
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 16, 16);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html
index 82d87e4..a3e6af9 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html
@@ -20,13 +20,13 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.globalAlpha = 0;
 ctx.strokeStyle = '#f00';
 ctx.lineWidth = 50;
 ctx.strokeRect(25, 24, 50, 2);
 _assertPixel(canvas, 50,25, 0,0,0,0);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html
index 889a260..fb4b4a1 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html
@@ -20,13 +20,13 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.globalCompositeOperation = 'source-in';
 ctx.strokeStyle = '#f00';
 ctx.lineWidth = 50;
 ctx.strokeRect(25, 24, 50, 2);
 _assertPixel(canvas, 50,25, 0,0,0,0);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html
index 941ae9a..3d34371 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.strokeStyle = '#0f0';
@@ -33,7 +33,7 @@
 _assertPixel(canvas, 75,12, 0,255,0,255);
 _assertPixel(canvas, 25,37, 0,255,0,255);
 _assertPixel(canvas, 75,37, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html
index 9f6ec5b..8085228 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.strokeStyle = '#f00';
@@ -49,7 +49,7 @@
 ctx.strokeRect(0, Infinity, 100, Infinity);
 ctx.strokeRect(0, 0, Infinity, Infinity);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html
index 1458f3e..b7a9925 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.beginPath();
 ctx.rect(0, 0, 100, 50);
 ctx.strokeStyle = '#f00';
@@ -29,7 +29,7 @@
 ctx.fillStyle = '#0f0';
 ctx.fill();
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html
index 0f0c131..769a6b1 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.fillStyle = '#f00';
@@ -32,7 +32,7 @@
 ctx.lineWidth = 50;
 ctx.strokeRect(0, -75, 100, 50);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html
index 60417c0..08148a5 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html
@@ -20,14 +20,14 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.scale(10, 10);
 ctx.translate(0, 5);
 ctx.strokeStyle = '#0f0';
 ctx.lineWidth = 5;
 ctx.strokeRect(2.5, -2.6, 5, 0.2);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html
index 8058197..52d0964 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html
@@ -20,12 +20,12 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.strokeStyle = '#f00';
 ctx.lineWidth = 250;
 ctx.strokeRect(50, 25, 0, 0);
 _assertPixel(canvas, 50,25, 0,0,0,0);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html
index b2f1d12..42b5018 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html
@@ -20,14 +20,14 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.strokeStyle = '#f00';
 ctx.lineWidth = 250;
 ctx.lineCap = 'round';
 ctx.lineJoin = 'round';
 ctx.strokeRect(50, 25, 0, 0);
 _assertPixel(canvas, 50,25, 0,0,0,0);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html
index 5423832..b5e6bdd 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html
@@ -20,12 +20,12 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.strokeStyle = '#0f0';
 ctx.lineWidth = 50;
 ctx.strokeRect(0, 25, 100, 0);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html
index b7c099b..a07d937 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html
@@ -20,13 +20,13 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.strokeStyle = '#f00';
 ctx.lineWidth = 250;
 ctx.lineCap = 'round';
 ctx.strokeRect(100, 25, 100, 0);
 _assertPixel(canvas, 50,25, 0,0,0,0);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html
index 7e57e77..363c27d 100644
--- a/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html
+++ b/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html
@@ -20,13 +20,13 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.strokeStyle = '#0f0';
 ctx.lineWidth = 250;
 ctx.lineJoin = 'round';
 ctx.strokeRect(100, 25, 100, 0);
 _assertPixel(canvas, 50,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html
index 49ed06d..6ce6fb6 100644
--- a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html
+++ b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html
@@ -20,14 +20,14 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur"}); });
 assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: undefined}); });
 assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: "foo"}); });
 assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: [1,2]}); });
 assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: NaN}); });
 assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: {}}); });
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html
index 8f20b73..3eda417 100644
--- a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html
+++ b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 assert_throws_js(TypeError, function() { new CanvasFilter({filter: "colorMatrix", values: undefined}); });
 assert_throws_js(TypeError, function() { new CanvasFilter({filter: "colorMatrix", values: "foo"}); });
 assert_throws_js(TypeError, function() { new CanvasFilter({filter: "colorMatrix", values: null}); });
@@ -64,7 +64,7 @@
 _assertPixelApprox(canvas, 60,10, 0,255,0,255, 2);
 _assertPixelApprox(canvas, 10,30, 0,255,0,255, 2);
 _assertPixelApprox(canvas, 60,30, 0,255,0,255, 2);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html
index 0063277..7cb8b0d 100644
--- a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html
+++ b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
 function getTransformedValue(C, V) {
     // Get the right interval
@@ -62,7 +62,7 @@
     ctx.fillRect(0, 0, 10, 10);
     _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
 }
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html
index bc27348..388fdca 100644
--- a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html
+++ b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
 function getColor(inputColor, amplitude, exponent, offset) {
     return [
@@ -53,7 +53,7 @@
     ctx.fillRect(0, 0, 10, 10);
     _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
 }
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html
index 9bfe33a..44eb718 100644
--- a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html
+++ b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.filter = new CanvasFilter({filter: "componentTransfer",
     funcR: {type: "identity"},
     funcG: {type: "identity"},
@@ -40,7 +40,7 @@
     ctx.fillRect(0, 0, 10, 10);
     _assertPixel(canvas, 5, 5, color[0],color[1],color[2],255);
 }
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html
index bcaeceb..d24a9e8 100644
--- a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html
+++ b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
 function getColor(inputColor, slopes, intercepts) {
     return [
@@ -52,7 +52,7 @@
     ctx.fillRect(0, 0, 10, 10);
     _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
 }
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html
index 648bb53..a704557 100644
--- a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html
+++ b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
 function getTransformedValue(C, V) {
     // Get the right interval
@@ -62,7 +62,7 @@
     ctx.fillRect(0, 0, 10, 10);
     _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
 }
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html
index 080ece3..e5efa9c 100644
--- a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html
+++ b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix"}); });
 assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", divisor: 2}); });
 assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: null}); });
@@ -32,7 +32,7 @@
 assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: []}); });
 // This should not throw an error
 ctx.filter = new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [[]]});
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html
index 58b7112..75d369c 100644
--- a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html
+++ b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 _assert(ctx.filter == 'none', "ctx.filter == 'none'");
 ctx.filter = 'blur(5px)';
 _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
@@ -42,7 +42,7 @@
 ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: 5});
 ctx.filter = "this string is not a filter and should do nothing";
 _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html
index fa25de0..7882e95 100644
--- a/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html
+++ b/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 const errorTestCases = [
   {baseFrequency: {}},
   {baseFrequency: -1},
@@ -125,7 +125,7 @@
   const filterOptions = {...{filter: "turbulence"}, ...testCase};
   _assert(new CanvasFilter(filterOptions) != null, "new CanvasFilter(filterOptions) != null");
 }
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/filters/2d.filter.value.html b/html/canvas/offscreen/filters/2d.filter.value.html
index 1f128d7..2267c9a 100644
--- a/html/canvas/offscreen/filters/2d.filter.value.html
+++ b/html/canvas/offscreen/filters/2d.filter.value.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 _assert(ctx.filter == 'none', "ctx.filter == 'none'");
 ctx.filter = 'blur(5px)';
 _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
@@ -51,7 +51,7 @@
 
 ctx.filter = 'blur(  5px)';
 assert_equals(ctx.filter, 'blur(  5px)');
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.cap.butt.html b/html/canvas/offscreen/line-styles/2d.line.cap.butt.html
index 14fcd789..d5eb4ca 100644
--- a/html/canvas/offscreen/line-styles/2d.line.cap.butt.html
+++ b/html/canvas/offscreen/line-styles/2d.line.cap.butt.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -56,7 +56,7 @@
 _assertPixel(canvas, 75,34, 0,255,0,255);
 _assertPixel(canvas, 75,35, 0,255,0,255);
 _assertPixel(canvas, 75,36, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.cap.closed.html b/html/canvas/offscreen/line-styles/2d.line.cap.closed.html
index 862923d..b26054f 100644
--- a/html/canvas/offscreen/line-styles/2d.line.cap.closed.html
+++ b/html/canvas/offscreen/line-styles/2d.line.cap.closed.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.strokeStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
@@ -41,7 +41,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html b/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html
index b8abebe..0570540 100644
--- a/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html
+++ b/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.lineCap = 'butt'
 _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
 
@@ -47,7 +47,7 @@
 ctx.lineCap = 'butt';
 ctx.lineCap = 'bevel';
 _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.cap.open.html b/html/canvas/offscreen/line-styles/2d.line.cap.open.html
index 4eff727..54f904b 100644
--- a/html/canvas/offscreen/line-styles/2d.line.cap.open.html
+++ b/html/canvas/offscreen/line-styles/2d.line.cap.open.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.strokeStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
@@ -41,7 +41,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.cap.round.html b/html/canvas/offscreen/line-styles/2d.line.cap.round.html
index 34252be..7886753 100644
--- a/html/canvas/offscreen/line-styles/2d.line.cap.round.html
+++ b/html/canvas/offscreen/line-styles/2d.line.cap.round.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -72,7 +72,7 @@
 _assertPixel(canvas, 67,43, 0,255,0,255);
 _assertPixel(canvas, 75,43, 0,255,0,255);
 _assertPixel(canvas, 82,43, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.cap.square.html b/html/canvas/offscreen/line-styles/2d.line.cap.square.html
index 84828e9..9d4a03e 100644
--- a/html/canvas/offscreen/line-styles/2d.line.cap.square.html
+++ b/html/canvas/offscreen/line-styles/2d.line.cap.square.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -56,7 +56,7 @@
 _assertPixel(canvas, 75,44, 0,255,0,255);
 _assertPixel(canvas, 75,45, 0,255,0,255);
 _assertPixel(canvas, 75,46, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.cap.valid.html b/html/canvas/offscreen/line-styles/2d.line.cap.valid.html
index e771dcd..996afb3 100644
--- a/html/canvas/offscreen/line-styles/2d.line.cap.valid.html
+++ b/html/canvas/offscreen/line-styles/2d.line.cap.valid.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.lineCap = 'butt'
 _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
 
@@ -29,7 +29,7 @@
 
 ctx.lineCap = 'square';
 _assertSame(ctx.lineCap, 'square', "ctx.lineCap", "'square'");
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.cross.html b/html/canvas/offscreen/line-styles/2d.line.cross.html
index 81fb12c..7c5821f 100644
--- a/html/canvas/offscreen/line-styles/2d.line.cross.html
+++ b/html/canvas/offscreen/line-styles/2d.line.cross.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -38,7 +38,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.defaults.html b/html/canvas/offscreen/line-styles/2d.line.defaults.html
index 3fdfe43..e8a39c0 100644
--- a/html/canvas/offscreen/line-styles/2d.line.defaults.html
+++ b/html/canvas/offscreen/line-styles/2d.line.defaults.html
@@ -20,12 +20,12 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
 _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
 _assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
 _assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html b/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html
index e731bf9..2554d71 100644
--- a/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html
+++ b/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.strokeStyle = 'rgb(0, 255, 0)';
 ctx.strokeStyle = 'nonsense';
 ctx.lineWidth = 200;
@@ -32,7 +32,7 @@
 _assert(imgdata[4] == 0, "imgdata[\""+(4)+"\"] == 0");
 _assert(imgdata[5] == 255, "imgdata[\""+(5)+"\"] == 255");
 _assert(imgdata[6] == 0, "imgdata[\""+(6)+"\"] == 0");
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.join.bevel.html b/html/canvas/offscreen/line-styles/2d.line.join.bevel.html
index 209a4f8..b2325ad 100644
--- a/html/canvas/offscreen/line-styles/2d.line.join.bevel.html
+++ b/html/canvas/offscreen/line-styles/2d.line.join.bevel.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -75,7 +75,7 @@
 _assertPixel(canvas, 85,15, 0,255,0,255);
 _assertPixel(canvas, 86,15, 0,255,0,255);
 _assertPixel(canvas, 86,14, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.join.closed.html b/html/canvas/offscreen/line-styles/2d.line.join.closed.html
index 999db7e..a999e73 100644
--- a/html/canvas/offscreen/line-styles/2d.line.join.closed.html
+++ b/html/canvas/offscreen/line-styles/2d.line.join.closed.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.strokeStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
@@ -40,7 +40,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.join.invalid.html b/html/canvas/offscreen/line-styles/2d.line.join.invalid.html
index 6af783a..f941c69 100644
--- a/html/canvas/offscreen/line-styles/2d.line.join.invalid.html
+++ b/html/canvas/offscreen/line-styles/2d.line.join.invalid.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.lineJoin = 'bevel'
 _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
 
@@ -47,7 +47,7 @@
 ctx.lineJoin = 'bevel';
 ctx.lineJoin = 'butt';
 _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.join.miter.html b/html/canvas/offscreen/line-styles/2d.line.join.miter.html
index e75176a..e31ef13 100644
--- a/html/canvas/offscreen/line-styles/2d.line.join.miter.html
+++ b/html/canvas/offscreen/line-styles/2d.line.join.miter.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -66,7 +66,7 @@
 _assertPixel(canvas, 90,10, 0,255,0,255);
 _assertPixel(canvas, 91,9, 0,255,0,255);
 _assertPixel(canvas, 92,8, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.join.open.html b/html/canvas/offscreen/line-styles/2d.line.join.open.html
index 448cd4a..b6a3901 100644
--- a/html/canvas/offscreen/line-styles/2d.line.join.open.html
+++ b/html/canvas/offscreen/line-styles/2d.line.join.open.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.strokeStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
@@ -40,7 +40,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.join.parallel.html b/html/canvas/offscreen/line-styles/2d.line.join.parallel.html
index 76bc404..aaba8e4 100644
--- a/html/canvas/offscreen/line-styles/2d.line.join.parallel.html
+++ b/html/canvas/offscreen/line-styles/2d.line.join.parallel.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -37,7 +37,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.join.round.html b/html/canvas/offscreen/line-styles/2d.line.join.round.html
index e0e58e8..5f41337 100644
--- a/html/canvas/offscreen/line-styles/2d.line.join.round.html
+++ b/html/canvas/offscreen/line-styles/2d.line.join.round.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -73,7 +73,7 @@
 _assertPixel(canvas, 87,13, 0,255,0,255);
 _assertPixel(canvas, 88,13, 0,255,0,255);
 _assertPixel(canvas, 88,12, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.join.valid.html b/html/canvas/offscreen/line-styles/2d.line.join.valid.html
index 8a6299c..1ea992c 100644
--- a/html/canvas/offscreen/line-styles/2d.line.join.valid.html
+++ b/html/canvas/offscreen/line-styles/2d.line.join.valid.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.lineJoin = 'bevel'
 _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
 
@@ -29,7 +29,7 @@
 
 ctx.lineJoin = 'miter';
 _assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.miter.acute.html b/html/canvas/offscreen/line-styles/2d.line.miter.acute.html
index 43528ef..db8e4f8 100644
--- a/html/canvas/offscreen/line-styles/2d.line.miter.acute.html
+++ b/html/canvas/offscreen/line-styles/2d.line.miter.acute.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -47,7 +47,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html b/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html
index d6fbc90..828af67 100644
--- a/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html
+++ b/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -39,7 +39,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html b/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html
index d731f0f..42d5d92 100644
--- a/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html
+++ b/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.miterLimit = 1.5;
 _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
 
@@ -55,7 +55,7 @@
 ctx.miterLimit = 1.5;
 ctx.miterLimit = false;
 _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html b/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html
index 0b43de6..89f4c03 100644
--- a/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html
+++ b/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -36,7 +36,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html b/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html
index 0bc4afb..69acc7e 100644
--- a/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html
+++ b/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -47,7 +47,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html b/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html
index dedf117..980f8a7 100644
--- a/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html
+++ b/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -39,7 +39,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.miter.valid.html b/html/canvas/offscreen/line-styles/2d.line.miter.valid.html
index fc0e799..1cf07cf 100644
--- a/html/canvas/offscreen/line-styles/2d.line.miter.valid.html
+++ b/html/canvas/offscreen/line-styles/2d.line.miter.valid.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.miterLimit = 1.5;
 _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
 
@@ -32,7 +32,7 @@
 
 ctx.miterLimit = 1000;
 _assertSame(ctx.miterLimit, 1000, "ctx.miterLimit", "1000");
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.miter.within.html b/html/canvas/offscreen/line-styles/2d.line.miter.within.html
index a98c04f..150953c 100644
--- a/html/canvas/offscreen/line-styles/2d.line.miter.within.html
+++ b/html/canvas/offscreen/line-styles/2d.line.miter.within.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -39,7 +39,7 @@
 _assertPixel(canvas, 48,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
 _assertPixel(canvas, 1,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.union.html b/html/canvas/offscreen/line-styles/2d.line.union.html
index ff5975a..69e42b7 100644
--- a/html/canvas/offscreen/line-styles/2d.line.union.html
+++ b/html/canvas/offscreen/line-styles/2d.line.union.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -41,7 +41,7 @@
 _assertPixel(canvas, 1,48, 0,255,0,255);
 _assertPixel(canvas, 25,1, 0,255,0,255);
 _assertPixel(canvas, 48,48, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.width.basic.html b/html/canvas/offscreen/line-styles/2d.line.width.basic.html
index 801601f..9b087ce 100644
--- a/html/canvas/offscreen/line-styles/2d.line.width.basic.html
+++ b/html/canvas/offscreen/line-styles/2d.line.width.basic.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -58,7 +58,7 @@
 _assertPixel(canvas, 84,25, 0,255,0,255);
 _assertPixel(canvas, 85,25, 0,255,0,255);
 _assertPixel(canvas, 86,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.width.invalid.html b/html/canvas/offscreen/line-styles/2d.line.width.invalid.html
index 5942627..0651b3f 100644
--- a/html/canvas/offscreen/line-styles/2d.line.width.invalid.html
+++ b/html/canvas/offscreen/line-styles/2d.line.width.invalid.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.lineWidth = 1.5;
 _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
 
@@ -55,7 +55,7 @@
 ctx.lineWidth = 1.5;
 ctx.lineWidth = false;
 _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html b/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html
index 44ff8f2..1203606 100644
--- a/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html
+++ b/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -35,7 +35,7 @@
 _assertPixel(canvas, 75,25, 0,255,0,255);
 _assertPixel(canvas, 50,5, 0,255,0,255);
 _assertPixel(canvas, 50,45, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.width.transformed.html b/html/canvas/offscreen/line-styles/2d.line.width.transformed.html
index 22dd5c9..d2358ba 100644
--- a/html/canvas/offscreen/line-styles/2d.line.width.transformed.html
+++ b/html/canvas/offscreen/line-styles/2d.line.width.transformed.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 
@@ -64,7 +64,7 @@
 _assertPixel(canvas, 84,25, 0,255,0,255);
 _assertPixel(canvas, 85,25, 0,255,0,255);
 _assertPixel(canvas, 86,25, 0,255,0,255);
-});
+})(canvas, ctx);
 t.done();
 
 });
diff --git a/html/canvas/offscreen/line-styles/2d.line.width.valid.html b/html/canvas/offscreen/line-styles/2d.line.width.valid.html
index 6b94966..4a4563c 100644
--- a/html/canvas/offscreen/line-styles/2d.line.width.valid.html
+++ b/html/canvas/offscreen/line-styles/2d.line.width.valid.html
@@ -20,7 +20,7 @@
 var canvas = new OffscreenCanvas(100, 50);
 var ctx = canvas.getContext('2d');
 
-await (function() {
+await (function(canvas, ctx) {
 ctx.lineWidth = 1.5;
 _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
 
@@ -32,7 +32,7 @@
 
 ctx.lineWidth = 1000;
 _assertSame(ctx.lineWidth, 1000, "ctx.lineWidth", "1000");
-});
+})(canvas, ctx);
 t.done();
 
 });