diff options
Diffstat (limited to 'testing/web-platform/tests/html/canvas/offscreen/text')
37 files changed, 0 insertions, 74 deletions
diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker.js index 44f093cdac..c11c8437e2 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.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(100, 50); var ctx = canvas.getContext('2d'); @@ -27,6 +26,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, "textAlign center is the center of the em squares (not the bounding box)"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.js index 4bd0f5a314..f5c5769470 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.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(100, 50); var ctx = canvas.getContext('2d'); @@ -28,6 +27,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, "textAlign end with ltr is the right edge"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.js index b3e62d8538..90e21f41dc 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.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(100, 50); var ctx = canvas.getContext('2d'); @@ -28,6 +27,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, "textAlign end with rtl is the left edge"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker.js index c7dc0bed42..0f92969632 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.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(100, 50); var ctx = canvas.getContext('2d'); @@ -27,6 +26,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, "textAlign left is the left of the first em square (not the bounding box)"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker.js index 58fe85e0b7..594192812a 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.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(100, 50); var ctx = canvas.getContext('2d'); @@ -27,6 +26,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, "textAlign right is the right of the last em square (not the bounding box)"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.js index c0793d9af6..32e6fc0f20 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.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(100, 50); var ctx = canvas.getContext('2d'); @@ -28,6 +27,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, "textAlign start with ltr is the left edge"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.js index ed706c287a..67a196daf7 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.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(100, 50); var ctx = canvas.getContext('2d'); @@ -28,6 +27,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, "textAlign start with rtl is the right edge"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.js index a98a5863d9..a0ab72915f 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.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(100, 50); var ctx = canvas.getContext('2d'); @@ -27,6 +26,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, ""); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.js index 30f60c574b..e171388834 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.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(100, 50); var ctx = canvas.getContext('2d'); @@ -27,6 +26,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, "textBaseline bottom is the bottom of the em square (not the bounding box)"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js index 638506a279..906fdbbf27 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.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(100, 50); var ctx = canvas.getContext('2d'); @@ -27,6 +26,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, ""); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js index 7c682fb5f1..76ac1d9da2 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.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(100, 50); var ctx = canvas.getContext('2d'); @@ -27,6 +26,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, ""); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.js index c373ab6c72..c288ab4c86 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.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(100, 50); var ctx = canvas.getContext('2d'); @@ -27,6 +26,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, "textBaseline middle is the middle of the em square (not the bounding box)"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.js index effc4418c3..e7d0b167c0 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.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(100, 50); var ctx = canvas.getContext('2d'); @@ -27,6 +26,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - t.done(); }, "textBaseline top is the top of the em square (not the bounding box)"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.js index adcb45faaa..a314870f11 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.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(100, 50); var ctx = canvas.getContext('2d'); @@ -24,6 +23,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - t.done(); }, "fillText handles maxWidth based on line size, not bounding box size"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.js index 8df519b7d1..e225e70351 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.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(100, 50); var ctx = canvas.getContext('2d'); @@ -24,6 +23,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - t.done(); }, "fillText works on @font-face fonts"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.js index 628cb39506..c35c82d71f 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.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(100, 50); var ctx = canvas.getContext('2d'); @@ -24,6 +23,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - t.done(); }, "@font-face fonts should work even if they are not used in the page"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.js index 7567c09558..fb1f7980a6 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.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(100, 50); var ctx = canvas.getContext('2d'); @@ -27,6 +26,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - t.done(); }, "Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker.js index 02257f0a06..a09a0f88d7 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.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(100, 50); var ctx = canvas.getContext('2d'); @@ -24,6 +23,5 @@ promise_test(async t => { _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - t.done(); }, ""); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker.js index ef09925c55..96bd4159c7 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.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(100, 50); var ctx = canvas.getContext('2d'); @@ -22,6 +21,5 @@ promise_test(async t => { ctx.fillText('E EE', -100, 37.5); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - t.done(); }, "U+0020 is rendered the correct size (1em wide)"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.js index 9a9afa1e74..e9cd9dc829 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.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(100, 50); var ctx = canvas.getContext('2d'); @@ -23,6 +22,5 @@ promise_test(async t => { ctx.fillText('EE ', 100, 37.5); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 255,0,0,255, 2); - t.done(); }, "Space characters at the end of a line are NOT collapsed"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.js index a12c2f9a48..a37094e28c 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.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(100, 50); var ctx = canvas.getContext('2d'); @@ -22,6 +21,5 @@ promise_test(async t => { ctx.fillText('E\x0b EE', -150, 37.5); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - t.done(); }, "Non-space characters are not converted to U+0020 and collapsed"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.js index bbf9e684be..1f090cb426 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.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(100, 50); var ctx = canvas.getContext('2d'); @@ -22,6 +21,5 @@ promise_test(async t => { ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', 0, 37.5); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 255,0,0,255, 2); - t.done(); }, "Space characters are converted to U+0020, and are NOT collapsed"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.js index e5ab7b67f4..02551b7de7 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.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(100, 50); var ctx = canvas.getContext('2d'); @@ -22,6 +21,5 @@ promise_test(async t => { ctx.fillText('E EE', 0, 37.5); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 255,0,0,255, 2); - t.done(); }, "Space characters are converted to U+0020, and are NOT collapsed"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.js index 20fec7801f..bd6e523283 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.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(100, 50); var ctx = canvas.getContext('2d'); @@ -22,6 +21,5 @@ promise_test(async t => { ctx.fillText(' EE', 0, 37.5); _assertPixelApprox(canvas, 25,25, 255,0,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - t.done(); }, "Space characters at the start of a line are NOT collapsed"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.js index c3d18ff878..aaec2e7e8e 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.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(100, 50); var ctx = canvas.getContext('2d'); @@ -41,6 +40,5 @@ promise_test(async t => { _assert(ctx.measureText('ABCD').actualBoundingBoxRight >= 200, "ctx.measureText('ABCD').actualBoundingBoxRight >= 200"); _assert(ctx.measureText('ABCD').actualBoundingBoxAscent >= 85, "ctx.measureText('ABCD').actualBoundingBoxAscent >= 85"); _assert(ctx.measureText('ABCD').actualBoundingBoxDescent >= 37, "ctx.measureText('ABCD').actualBoundingBoxDescent >= 37"); - t.done(); }, "Testing actualBoundingBox"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.worker.js index 4b02f06f2d..3bf2d9f719 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.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(100, 50); var ctx = canvas.getContext('2d'); @@ -32,6 +31,5 @@ promise_test(async t => { _assertSame(ctx.measureText('Hello').advances[2], tm.advances[2], "ctx.measureText('Hello').advances[\""+(2)+"\"]", "tm.advances[\""+(2)+"\"]"); _assertSame(ctx.measureText('Hello').advances[3], tm.advances[3], "ctx.measureText('Hello').advances[\""+(3)+"\"]", "tm.advances[\""+(3)+"\"]"); _assertSame(ctx.measureText('Hello').advances[4], tm.advances[4], "ctx.measureText('Hello').advances[\""+(4)+"\"]", "tm.advances[\""+(4)+"\"]"); - t.done(); }, "Testing width advances"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js index ddb48f4fe0..6e7b064ac8 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.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(100, 50); var ctx = canvas.getContext('2d'); @@ -25,6 +24,5 @@ promise_test(async t => { _assertSame(Math.abs(ctx.measureText('ABCD').alphabeticBaseline), 0, "Math.abs(ctx.measureText('ABCD').alphabeticBaseline)", "0"); _assertSame(ctx.measureText('ABCD').ideographicBaseline, 6.25, "ctx.measureText('ABCD').ideographicBaseline", "6.25"); _assertSame(ctx.measureText('ABCD').hangingBaseline, 25, "ctx.measureText('ABCD').hangingBaseline", "25"); - t.done(); }, "Testing baselines"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.worker.js index 09ee787309..cbcb5ec004 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.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(100, 50); var ctx = canvas.getContext('2d'); @@ -25,6 +24,5 @@ promise_test(async t => { _assertSame(ctx.measureText('ABCD').emHeightAscent, 20, "ctx.measureText('ABCD').emHeightAscent", "20"); _assertSame(ctx.measureText('ABCD').emHeightDescent, 20, "ctx.measureText('ABCD').emHeightDescent", "20"); _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 40, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "40"); - t.done(); }, "Testing emHeights with reduced ascent metric"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.worker.js index a2f09782c9..4b62bd5665 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.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(100, 50); var ctx = canvas.getContext('2d'); @@ -25,6 +24,5 @@ promise_test(async t => { _assertSame(ctx.measureText('ABCD').emHeightAscent, 40, "ctx.measureText('ABCD').emHeightAscent", "40"); _assertSame(ctx.measureText('ABCD').emHeightDescent, 0, "ctx.measureText('ABCD').emHeightDescent", "0"); _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 40, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "40"); - t.done(); }, "Testing emHeights with zero descent metric"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker.js index 0385d3d737..163394ff1b 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.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(100, 50); var ctx = canvas.getContext('2d'); @@ -25,6 +24,5 @@ promise_test(async t => { _assertSame(ctx.measureText('ABCD').emHeightAscent, 30, "ctx.measureText('ABCD').emHeightAscent", "30"); _assertSame(ctx.measureText('ABCD').emHeightDescent, 10, "ctx.measureText('ABCD').emHeightDescent", "10"); _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 40, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "40"); - t.done(); }, "Testing emHeights"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.worker.js index dea67ff8f6..6ea01b1496 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.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(100, 50); var ctx = canvas.getContext('2d'); @@ -23,6 +22,5 @@ promise_test(async t => { _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 10, "ctx.measureText('ABCD').fontBoundingBoxAscent", "10"); _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 10, "ctx.measureText('ABCD').fontBoundingBoxDescent", "10"); - t.done(); }, "Testing fontBoundingBox for OffscreenCanvas with reduced ascent metric"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.worker.js index 99a886d015..c8175eec3c 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.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(100, 50); var ctx = canvas.getContext('2d'); @@ -23,6 +22,5 @@ promise_test(async t => { _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 30, "ctx.measureText('ABCD').fontBoundingBoxAscent", "30"); _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 0, "ctx.measureText('ABCD').fontBoundingBoxDescent", "0"); - t.done(); }, "Testing fontBoundingBox for OffscreenCanvas with zero descent metric"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.worker.js index 255bcd108a..080a4d45b8 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.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(100, 50); var ctx = canvas.getContext('2d'); @@ -22,6 +21,5 @@ promise_test(async t => { _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 10, "ctx.measureText('A').fontBoundingBoxDescent", "10"); _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 40, "ctx.measureText('ABCD').fontBoundingBoxAscent", "40"); _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 10, "ctx.measureText('ABCD').fontBoundingBoxDescent", "10"); - t.done(); }, "Testing fontBoundingBox for font ahem"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.js index b2cde04c0d..5c28b8f688 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.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(100, 50); var ctx = canvas.getContext('2d'); @@ -23,6 +22,5 @@ promise_test(async t => { _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 30, "ctx.measureText('ABCD').fontBoundingBoxAscent", "30"); _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 10, "ctx.measureText('ABCD').fontBoundingBoxDescent", "10"); - t.done(); }, "Testing fontBoundingBox measurements"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker.js index 866ad8b3c5..f653f20f8e 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.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(100, 50); var ctx = canvas.getContext('2d'); @@ -22,6 +21,5 @@ promise_test(async t => { ctx.font = '100px CanvasTest'; _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100"); - t.done(); }, "The width of character is same as font used"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker.js index 6fb89c5ba7..932b82e129 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.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(100, 50); var ctx = canvas.getContext('2d'); @@ -17,6 +16,5 @@ promise_test(async t => { await self.fonts.ready; ctx.font = '50px CanvasTest'; _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0"); - t.done(); }, "The empty string has zero width"); done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js index d832feec5f..3f0e6d65da 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.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(100, 50); var ctx = canvas.getContext('2d'); @@ -23,6 +22,5 @@ promise_test(async t => { _assertSame(ctx.measureText(' AB').width, 150, "ctx.measureText(' AB').width", "150"); _assertSame(ctx.measureText('AB ').width, 150, "ctx.measureText('AB ').width", "150"); - t.done(); }, "Space characters are converted to U+0020 and NOT collapsed"); done(); |