Bug 1466956 [wpt PR 11362] - OffscreenCanvas Text rendering tests, a=testonly
authorFernando Serboncini <fserb@chromium.org>
Fri, 06 Jul 2018 17:44:02 +0000
changeset 425910 b7ee46c6d5df702d6d8d67f5a2720e59c0fe3c2d
parent 425909 6e13778ef66ce9c7861ad7ec9baeca387dbb9516
child 425911 83c81aeaf3448748697e85a7864772776fc74861
push id34267
push userrgurzau@mozilla.com
push dateWed, 11 Jul 2018 22:05:21 +0000
treeherdermozilla-central@3aca103e4915 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1466956, 11362, 1087416, 566200
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1466956 [wpt PR 11362] - OffscreenCanvas Text rendering tests, a=testonly Automatic update from web-platform-testsOffscreenCanvas Text rendering tests Change-Id: I5451097ffa7fada9bde584f215619ca838399802 Reviewed-on: https://chromium-review.googlesource.com/1087416 Commit-Queue: Fernando Serboncini <fserb@chromium.org> Reviewed-by: Justin Novosad <junov@chromium.org> Cr-Commit-Position: refs/heads/master@{#566200} -- wpt-commits: 3f543086e31e64fdec1185e22be58c23d3bc0118 wpt-pr: 11362
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/common/canvas-tests.js
testing/web-platform/tests/offscreen-canvas/green-100x50.png
testing/web-platform/tests/offscreen-canvas/text/2d.text.align.default.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.align.default.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.align.invalid.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.align.invalid.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.align.valid.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.align.valid.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.default.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.default.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.invalid.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.invalid.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.valid.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.valid.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.center.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.center.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.left.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.left.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.right.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.right.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.middle.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.middle.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.top.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.top.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.basic.png
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.png
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.rtl.png
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.basic.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.basic.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.stroke.basic.png
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.default.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.default.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.basic.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.basic.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.complex.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.complex.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.invalid.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.invalid.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.system.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.system.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.tiny.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.tiny.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.basic.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.basic.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.empty.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.empty.worker.js
testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.space.html
testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.space.worker.js
testing/web-platform/tests/offscreen-canvas/tools/name2dir.yaml
testing/web-platform/tests/offscreen-canvas/tools/templates.yaml
testing/web-platform/tests/offscreen-canvas/tools/tests2d.yaml
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -12962,16 +12962,76 @@
     ]
    ],
    "notifications/tag-same-manual.html": [
     [
      "/notifications/tag-same-manual.html",
      {}
     ]
    ],
+   "offscreen-canvas/text/2d.text.draw.fill.basic-manual.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.basic-manual.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js",
+     {}
+    ]
+   ],
    "orientation-event/free-fall-manual.html": [
     [
      "/orientation-event/free-fall-manual.html",
      {}
     ]
    ],
    "orientation-event/horizontal-surface-manual.html": [
     [
@@ -290447,16 +290507,41 @@
      {}
     ]
    ],
    "offscreen-canvas/filter/offscreencanvas.filter.js": [
     [
      {}
     ]
    ],
+   "offscreen-canvas/green-100x50.png": [
+    [
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.basic.png": [
+    [
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.png": [
+    [
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.rtl.png": [
+    [
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.stroke.basic.png": [
+    [
+     {}
+    ]
+   ],
    "offscreen-canvas/tools/META.yml": [
     [
      {}
     ]
    ],
    "offscreen-canvas/tools/build.sh": [
     [
      {}
@@ -362958,16 +363043,556 @@
     ]
    ],
    "offscreen-canvas/shadows/2d.shadow.transform.2.worker.js": [
     [
      "/offscreen-canvas/shadows/2d.shadow.transform.2.worker.html",
      {}
     ]
    ],
+   "offscreen-canvas/text/2d.text.align.default.html": [
+    [
+     "/offscreen-canvas/text/2d.text.align.default.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.align.default.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.align.default.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.align.invalid.html": [
+    [
+     "/offscreen-canvas/text/2d.text.align.invalid.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.align.invalid.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.align.invalid.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.align.valid.html": [
+    [
+     "/offscreen-canvas/text/2d.text.align.valid.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.align.valid.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.align.valid.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.baseline.default.html": [
+    [
+     "/offscreen-canvas/text/2d.text.baseline.default.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.baseline.default.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.baseline.default.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.baseline.invalid.html": [
+    [
+     "/offscreen-canvas/text/2d.text.baseline.invalid.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.baseline.invalid.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.baseline.invalid.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.baseline.valid.html": [
+    [
+     "/offscreen-canvas/text/2d.text.baseline.valid.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.baseline.valid.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.baseline.valid.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.center.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.center.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.center.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.center.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.end.ltr.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.end.ltr.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.end.rtl.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.end.rtl.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.left.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.left.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.left.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.left.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.right.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.right.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.right.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.right.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.start.ltr.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.start.ltr.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.start.rtl.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.start.rtl.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.bottom.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.bottom.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.hanging.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.hanging.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.ideographic.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.ideographic.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.middle.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.middle.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.middle.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.middle.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.top.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.top.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.baseline.top.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.baseline.top.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.unaffected.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.unaffected.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fontface.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fontface.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fontface.notinpage.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fontface.notinpage.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fontface.repeat.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fontface.repeat.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.fontface.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.fontface.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.basic.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.basic.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.basic.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.basic.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.collapse.end.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.collapse.end.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.collapse.other.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.collapse.other.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.collapse.space.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.collapse.space.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.collapse.start.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.collapse.start.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.stroke.unaffected.html": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.stroke.unaffected.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.default.html": [
+    [
+     "/offscreen-canvas/text/2d.text.font.default.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.default.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.font.default.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.parse.basic.html": [
+    [
+     "/offscreen-canvas/text/2d.text.font.parse.basic.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.parse.basic.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.font.parse.basic.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.parse.complex.html": [
+    [
+     "/offscreen-canvas/text/2d.text.font.parse.complex.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.parse.complex.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.font.parse.complex.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.parse.invalid.html": [
+    [
+     "/offscreen-canvas/text/2d.text.font.parse.invalid.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.parse.invalid.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.font.parse.invalid.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.parse.system.html": [
+    [
+     "/offscreen-canvas/text/2d.text.font.parse.system.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.parse.system.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.font.parse.system.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.parse.tiny.html": [
+    [
+     "/offscreen-canvas/text/2d.text.font.parse.tiny.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.font.parse.tiny.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.font.parse.tiny.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.measure.width.basic.html": [
+    [
+     "/offscreen-canvas/text/2d.text.measure.width.basic.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.measure.width.basic.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.measure.width.basic.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.measure.width.empty.html": [
+    [
+     "/offscreen-canvas/text/2d.text.measure.width.empty.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.measure.width.empty.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.measure.width.empty.worker.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.measure.width.space.html": [
+    [
+     "/offscreen-canvas/text/2d.text.measure.width.space.html",
+     {}
+    ]
+   ],
+   "offscreen-canvas/text/2d.text.measure.width.space.worker.js": [
+    [
+     "/offscreen-canvas/text/2d.text.measure.width.space.worker.html",
+     {}
+    ]
+   ],
    "offscreen-canvas/the-canvas-state/2d.state.saverestore.bitmap.html": [
     [
      "/offscreen-canvas/the-canvas-state/2d.state.saverestore.bitmap.html",
      {}
     ]
    ],
    "offscreen-canvas/the-canvas-state/2d.state.saverestore.bitmap.worker.js": [
     [
@@ -418378,17 +419003,17 @@
    "5aeba7a0e72feba74a6cb4d707161131102792a0",
    "support"
   ],
   "common/canvas-tests.css.headers": [
    "1060d9437c410f4ee2a97f315d5dcc06640cfcb1",
    "support"
   ],
   "common/canvas-tests.js": [
-   "329e3ae1cfde2ee0525302e6a3260faed3885f28",
+   "c31f3a58eda8896f273650420c9b0e2ae1bc65ed",
    "support"
   ],
   "common/canvas-tests.js.headers": [
    "e3593850f8098d3f3ff82c042deab15f51c66a52",
    "support"
   ],
   "common/css-paint-tests.js.headers": [
    "e3593850f8098d3f3ff82c042deab15f51c66a52",
@@ -597417,16 +598042,20 @@
   "offscreen-canvas/filter/offscreencanvas.filter.js": [
    "6d44bb13105f22ced5654f3030340e32255eb476",
    "support"
   ],
   "offscreen-canvas/filter/offscreencanvas.filter.w.html": [
    "d6478260afe1ae812374b7e9178f90697e148f61",
    "testharness"
   ],
+  "offscreen-canvas/green-100x50.png": [
+   "de18139c6fb9e1ef54ca8fd35a9f47ee213172a5",
+   "support"
+  ],
   "offscreen-canvas/image-smoothing/image.smoothing.html": [
    "2c18b7a9bd01ee8fbfd74d3556f1609b7c3de1a7",
    "testharness"
   ],
   "offscreen-canvas/image-smoothing/image.smoothing.worker.js": [
    "bb5000db29e7135a01cf378b6fe733cc23925f8c",
    "testharness"
   ],
@@ -599593,16 +600222,432 @@
   "offscreen-canvas/shadows/2d.shadow.transform.2.html": [
    "9a2d767df56411a0c867c76e3fac81af52ddab08",
    "testharness"
   ],
   "offscreen-canvas/shadows/2d.shadow.transform.2.worker.js": [
    "126f4504f7a7aabe0724f6b1e49b7b6c6c5ac3a8",
    "testharness"
   ],
+  "offscreen-canvas/text/2d.text.align.default.html": [
+   "0f03b74a423e4046f977e064990189d9369363e4",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.align.default.worker.js": [
+   "3b923cedd2e519c310599827d2d27ccec971f067",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.align.invalid.html": [
+   "2ef2f370d5685657abbf426b22c408df1cf7a909",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.align.invalid.worker.js": [
+   "f02bf2bee2b1058746d4860ccc6f6074d32d8f17",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.align.valid.html": [
+   "fb2804ae631143d79f51445c0d21d24c29baba4a",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.align.valid.worker.js": [
+   "b110900fc3397da210d85435b9fd044e36044fe8",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.baseline.default.html": [
+   "15123f24a6bd2ce91da69a699dce0e6e732160ea",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.baseline.default.worker.js": [
+   "c64b323eaab96a25c3d998d56d24d71194ed11d5",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.baseline.invalid.html": [
+   "666e5a38b9b29846def2d4973e47d8c5370ef174",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.baseline.invalid.worker.js": [
+   "6367302e1bc2cb8c033e6260efb802325f7eca1b",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.baseline.valid.html": [
+   "ec223c711f463b11de7f87113120730bf508e6e6",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.baseline.valid.worker.js": [
+   "2edca0451c17d32641a56f2bc3291a0f82b5aec9",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.center.html": [
+   "075aba3a36ddf818389a466610b83d5b32ca2cca",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.center.worker.js": [
+   "a64a6f1ca7d1d156a3338c44c6b68da05004993a",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.end.ltr.html": [
+   "ace6eade83e8387ee79336d7ee916080a322a507",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.js": [
+   "bec18ab1877b5779b949a687956dfdd7afb181b5",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.end.rtl.html": [
+   "909158a5cdaf163fcfc3118c17aa60b683a4c0f6",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.js": [
+   "90305645fc74504a19490961529c6ab2d010bfd2",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.left.html": [
+   "6ef2b6307975ff4403d86d2ac1274cf7034f1fce",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.left.worker.js": [
+   "faa688af0bbc8bbf050385a8ca26350a448604d5",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.right.html": [
+   "77b5f05efbbee3497883a5f24891d0791e4232c2",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.right.worker.js": [
+   "762f0297da3f72998b3edf25cbcc88ef29ff09fb",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.start.ltr.html": [
+   "8e981ab37b06c5b73b95bee27ad8b31d08a227b6",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.js": [
+   "cb8dabd5c4db7d31fabc014ea984c6525c74101a",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.start.rtl.html": [
+   "2ac30666d9786ac16cb1f44839b009e94f5bdcb6",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.js": [
+   "4a917b65cf8c7d6efaaafb55a57904e73c02fb51",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html": [
+   "98aaeeaa5f7eed3d89443e83eebbbbc5ee349f13",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.js": [
+   "c8749c719d3b51ca3d7420506a50097d07de9d18",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.bottom.html": [
+   "86d9559a8064398036835090683335ba6da362e9",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.js": [
+   "259bf3095025b5fda39dc9f37d1cca1283bbd6b1",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.hanging.html": [
+   "24ece1ead594df694ce984447b34495052052b7f",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.js": [
+   "03245b8773cf0d783242f5e6b87883e09fda8e18",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.ideographic.html": [
+   "8d3df854174a3b31f4b641a2ba19d25284abecf2",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.js": [
+   "c512f15ea50b8f663778fe727503e276a07eebaf",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.middle.html": [
+   "cd4d3c469262051208ab77b07211751aa745f356",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.middle.worker.js": [
+   "75f4334744ac4072bb5f16b8e30a8682822bf396",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.top.html": [
+   "c3e659200d75672e6dcc9fb6c28810c6020e6da7",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.baseline.top.worker.js": [
+   "0ac575fbcc07af258153a8b60f9d7325b5efb655",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.basic-manual.html": [
+   "e716712df480c959042d97befa40a3fdae7e4a65",
+   "manual"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js": [
+   "ee9dab8283c7386bdd92b1509fbba690d6136eea",
+   "manual"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.basic.png": [
+   "994c4f1bf8377dbce0c1af8805f2c1166044d521",
+   "support"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html": [
+   "d608d2b08c593677d0127be36748775759a45147",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.js": [
+   "6e520919cdc24a9162c506d1a089115cce61f81b",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html": [
+   "db24c5bad46382d5a01f69cf5f593ee92df0fc74",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.js": [
+   "a2edc7eec240c3910b04c659913ff65c1bf781d3",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html": [
+   "bb4f0ad1ff7b6cdb1581b7783e9a3366db556fc2",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.js": [
+   "da9dd0e360dfcf5ebb1c92d73a8c4d4d163f9f8e",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html": [
+   "2ccfc824ed8626fa73f1e1f6e9fa00de26372d7c",
+   "manual"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js": [
+   "ce5394e1d049562c55b82d31498d2102733cbe91",
+   "manual"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.png": [
+   "994c4f1bf8377dbce0c1af8805f2c1166044d521",
+   "support"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html": [
+   "cf3b7eab36b3e3e88308cfca2dd902b4a83948e5",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.js": [
+   "fa7bf0f400a981ad2ab24dfafdecaaa4112df0c4",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html": [
+   "eace6e3a9737c7168767fe076d9d073450084a4a",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.js": [
+   "3a31baff14975ea11bc1a85f73feed5a10253cbd",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html": [
+   "609e35604340223ff3b0a523f60c425b4e20a517",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.js": [
+   "a2cc87ea10bd31925a453e772501680db9331999",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html": [
+   "0e86f2f9c376d7be73b59b0566777033e1961b2f",
+   "manual"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js": [
+   "f75091da621b188f0d907b0109ba755e03bf51b7",
+   "manual"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.rtl.png": [
+   "994c4f1bf8377dbce0c1af8805f2c1166044d521",
+   "support"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.unaffected.html": [
+   "08c5cb00927184947c48e34785dcea79f1c9242e",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.js": [
+   "dd75c38e75c4fffaec936aecca7ffcfebffef4c0",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fontface.html": [
+   "406dca361b9d49ed1ab3ab974ffb2b61c72e656e",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fontface.notinpage.html": [
+   "0e7003fdb4e8fa91a46ce38e59cf428002ef9fdd",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.js": [
+   "2fecc82c2ba6eb8a7c08165090001318b70b3c2f",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fontface.repeat.html": [
+   "ce98e5bf83be9b33d31d992e603433c08564a755",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.js": [
+   "831fe6ec1f83373ecde78490e1a151023615b980",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.fontface.worker.js": [
+   "b27d08fa064682967f479bfd897b13e1bf3a9da8",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html": [
+   "01bcff19c99a71b645d2e6945e8fb8281f8955d2",
+   "manual"
+  ],
+  "offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js": [
+   "858c0142d77e507844ce0e3e491f1ae91891bce6",
+   "manual"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.basic.html": [
+   "5e47b181d06bd0759bad5235d1d1136c695e4026",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.basic.worker.js": [
+   "af97e3713a5933e81381d64be1b6732211f82080",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.collapse.end.html": [
+   "62bf2c231cce285bb2ce59b5e693f600ebaac6f8",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.js": [
+   "b4359cf1b5bd3133c5ea9bdbede49b77dab215a2",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html": [
+   "76ef0f14c003df20a6c537343827f59f40426ddd",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.js": [
+   "5050d1672837608ace2eb538868a49fa9d4e8551",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.collapse.other.html": [
+   "78edf9b8c18c6bed5618f9098295b40d06f69795",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.js": [
+   "d47f1e453f97bcbc14598f544fbe62cf71907232",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.collapse.space.html": [
+   "2a0f34a7cb060d8a5bfb8f047313cdae06e8d654",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.js": [
+   "aa44b04ab86d3832989ac9cf4f4afe67ebcbb84c",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.collapse.start.html": [
+   "ff8bc0c1cbd1544553ac518c6514cc9209c9babb",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.js": [
+   "91bb3b7c5f46c03e765096c6ab56952bf07221ec",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html": [
+   "a09a7d06c95de71f7c398eeb8ba86795b51420d8",
+   "manual"
+  ],
+  "offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js": [
+   "10d57dc95232df8e9b9ffa6ffb09b7afdfada7b7",
+   "manual"
+  ],
+  "offscreen-canvas/text/2d.text.draw.stroke.basic.png": [
+   "1e85aad73026ce90363714e1e3a9f028ca26d8d4",
+   "support"
+  ],
+  "offscreen-canvas/text/2d.text.draw.stroke.unaffected.html": [
+   "6c84e6d7f9e1a3dc8cf7b6ef5566b7610696ebd1",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.js": [
+   "e1701c3dfb0ba6f224dbba03a2a4a76a094e22d4",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.default.html": [
+   "a98dfbeb969e49e16223ccf7f3dd502db76508a2",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.default.worker.js": [
+   "8e9586b95cb6e7b97d96cf774a50822aca35f766",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.parse.basic.html": [
+   "2fff7c32ea143644835103459d8b5e878e96adae",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.parse.basic.worker.js": [
+   "9188a9d8b7ba689530a381c63a474916441a429c",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.parse.complex.html": [
+   "693ae3ed12e8406e057353dfed6fc674291371ce",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.parse.complex.worker.js": [
+   "256c24cd52c9dc39638d3ebc62a6f4aee63d5771",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.parse.invalid.html": [
+   "a787440718f848f0a8bc7287830ef21de712c5ff",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.parse.invalid.worker.js": [
+   "e739eec435898759d4b84800ab3aa387837882c0",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.parse.system.html": [
+   "5c7cde7b2c1a61cdfd350d8f8138fc9c0f0bc9c6",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.parse.system.worker.js": [
+   "824a4414ab9d7d84bbb5a6bfdaa9612a11248c8d",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.parse.tiny.html": [
+   "bfc6cc1661ce5a1abf99281110b91368becc095f",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.font.parse.tiny.worker.js": [
+   "a0b347ed0d1b99f0896cff1e5da2afb39cb3728b",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.measure.width.basic.html": [
+   "8f9708539c6135c8c4b39675355de29c489387a5",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.measure.width.basic.worker.js": [
+   "65ad87719af9eb8856d270aef314297c481acb9a",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.measure.width.empty.html": [
+   "56532c174e0d56e743ce73b7dff3f48d8f551086",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.measure.width.empty.worker.js": [
+   "cdce07e82cbf743a7efe4b3869b423e7c114f9fd",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.measure.width.space.html": [
+   "d39369ef48d14cdd98b3a8824c3def660530700e",
+   "testharness"
+  ],
+  "offscreen-canvas/text/2d.text.measure.width.space.worker.js": [
+   "d4cc19770fb7d885e1681f0b29733d98f2693459",
+   "testharness"
+  ],
   "offscreen-canvas/the-canvas-state/2d.state.saverestore.bitmap.html": [
    "e5d7d40f76ad24edaeff50d79f02bfdbd40e63d4",
    "testharness"
   ],
   "offscreen-canvas/the-canvas-state/2d.state.saverestore.bitmap.worker.js": [
    "a4169f56c9074356459c71d70bd799e580aca1e6",
    "testharness"
   ],
@@ -600154,25 +601199,25 @@
    "e4f65db6a439972ed7a83f4cc2c9bae792ec2d27",
    "support"
   ],
   "offscreen-canvas/tools/gentest.py": [
    "a00789037db0edb16dac99f4bbfeaaebb5edfdc5",
    "support"
   ],
   "offscreen-canvas/tools/name2dir.yaml": [
-   "ed640afbc6614fa9b53e6061192544b0fdc4f51e",
+   "ac9ba9b8718cc68da51b32cc92fef2ad7cab075a",
    "support"
   ],
   "offscreen-canvas/tools/templates.yaml": [
-   "d8959532cf7948a99fb99b086ed22eb13f1870db",
+   "d2839fc39d5da4af8745ac09f47258256b72eac0",
    "support"
   ],
   "offscreen-canvas/tools/tests2d.yaml": [
-   "0e1cf2837f41da2e37a0a4786fba207a104e2e0b",
+   "ecd17e9a6dd3743de6df149a20f541d17ebe09d5",
    "support"
   ],
   "offscreen-canvas/transformations/2d.transformation.order.html": [
    "5d2711b430dbf5822df83d53c034312bacf474b6",
    "testharness"
   ],
   "offscreen-canvas/transformations/2d.transformation.order.worker.js": [
    "e74361161f3f8aa94a0e8f9ea4ab8db29ffb32aa",
--- a/testing/web-platform/tests/common/canvas-tests.js
+++ b/testing/web-platform/tests/common/canvas-tests.js
@@ -45,29 +45,33 @@ function _assertPixelApprox(canvas, x,y,
 {
     var c = _getPixel(canvas, x,y);
     assert_approx_equals(c[0], r, tolerance, 'Red channel of the pixel at (' + x + ', ' + y + ')');
     assert_approx_equals(c[1], g, tolerance, 'Green channel of the pixel at (' + x + ', ' + y + ')');
     assert_approx_equals(c[2], b, tolerance, 'Blue channel of the pixel at (' + x + ', ' + y + ')');
     assert_approx_equals(c[3], a, tolerance, 'Alpha channel of the pixel at (' + x + ', ' + y + ')');
 }
 
+let _deferred = false;
+
+function deferTest() {
+  _deferred = true;
+}
+
 function _addTest(testFn)
 {
-    var deferred = false;
-    window.deferTest = function () { deferred = true; };
     on_event(window, "load", function()
     {
         t.step(function() {
             var canvas = document.getElementById('c');
             var ctx = canvas.getContext('2d');
             t.step(testFn, window, canvas, ctx);
         });
 
-        if (!deferred) {
+        if (!_deferred) {
             t.done();
         }
     });
 }
 
 function _assertGreen(ctx, canvasWidth, canvasHeight)
 {
     var testColor = function(d, idx, expected) {
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2733836c998fa919d9f6880fd96a32026e82ca2c
GIT binary patch
literal 205
zc%17D@N?(olHy`uVBq!ia0vp^DL`z*!2~2#!(YAxQfx`y?k)`fL2$v|<&%LTO`a}}
zAsLNtFF0~CC@>sw*jk^y_CcJ|9aV|h$^3e2uQS>kY8%iLTDVVOOukmV+zsd&22WQ%
Jmvv4FO#p%IF~$G@
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.align.default.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.align.default</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.align.default</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.align.default.worker.js
@@ -0,0 +1,20 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.align.default
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.align.invalid.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.align.invalid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.align.invalid</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'bogus';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'END';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'end ';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'end\0';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.align.invalid.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.align.invalid
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'bogus';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'END';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'end ';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'end\0';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.align.valid.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.align.valid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.align.valid</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textAlign = 'start';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'end';
+_assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'");
+
+ctx.textAlign = 'left';
+_assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'");
+
+ctx.textAlign = 'right';
+_assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'");
+
+ctx.textAlign = 'center';
+_assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.align.valid.worker.js
@@ -0,0 +1,33 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.align.valid
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textAlign = 'start';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'end';
+_assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'");
+
+ctx.textAlign = 'left';
+_assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'");
+
+ctx.textAlign = 'right';
+_assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'");
+
+ctx.textAlign = 'center';
+_assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.default.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.baseline.default</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.baseline.default</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.default.worker.js
@@ -0,0 +1,20 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.baseline.default
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.invalid.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.baseline.invalid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.baseline.invalid</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'bogus';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'MIDDLE';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'middle ';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'middle\0';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.invalid.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.baseline.invalid
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'bogus';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'MIDDLE';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'middle ';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'middle\0';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.valid.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.baseline.valid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.baseline.valid</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textBaseline = 'top';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'hanging';
+_assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'");
+
+ctx.textBaseline = 'middle';
+_assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'");
+
+ctx.textBaseline = 'alphabetic';
+_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'");
+
+ctx.textBaseline = 'ideographic';
+_assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'");
+
+ctx.textBaseline = 'bottom';
+_assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.baseline.valid.worker.js
@@ -0,0 +1,36 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.baseline.valid
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textBaseline = 'top';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'hanging';
+_assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'");
+
+ctx.textBaseline = 'middle';
+_assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'");
+
+ctx.textBaseline = 'alphabetic';
+_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'");
+
+ctx.textBaseline = 'ideographic';
+_assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'");
+
+ctx.textBaseline = 'bottom';
+_assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.center.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.center</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.center</h1>
+<p class="desc">textAlign center is the center of the em squares (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textAlign center is the center of the em squares (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'center';
+    ctx.fillText('DD', 50, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.center.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.center
+// Description:textAlign center is the center of the em squares (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign center is the center of the em squares (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'center';
+    ctx.fillText('DD', 50, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.end.ltr</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.end.ltr</h1>
+<p class="desc">textAlign end with ltr is the right edge</p>
+
+
+<script>
+var t = async_test("textAlign end with ltr is the right edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'end';
+    ctx.fillText('DD', 100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.end.ltr
+// Description:textAlign end with ltr is the right edge
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign end with ltr is the right edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'end';
+    ctx.fillText('DD', 100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.end.rtl</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.end.rtl</h1>
+<p class="desc">textAlign end with rtl is the left edge</p>
+
+
+<script>
+var t = async_test("textAlign end with rtl is the left edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'end';
+    ctx.fillText('DD', 0, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.end.rtl
+// Description:textAlign end with rtl is the left edge
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign end with rtl is the left edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'end';
+    ctx.fillText('DD', 0, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.left.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.left</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.left</h1>
+<p class="desc">textAlign left is the left of the first em square (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textAlign left is the left of the first em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'left';
+    ctx.fillText('DD', 0, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.left.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.left
+// Description:textAlign left is the left of the first em square (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign left is the left of the first em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'left';
+    ctx.fillText('DD', 0, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.right.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.right</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.right</h1>
+<p class="desc">textAlign right is the right of the last em square (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textAlign right is the right of the last em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'right';
+    ctx.fillText('DD', 100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.right.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.right
+// Description:textAlign right is the right of the last em square (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign right is the right of the last em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'right';
+    ctx.fillText('DD', 100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.start.ltr</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.start.ltr</h1>
+<p class="desc">textAlign start with ltr is the left edge</p>
+
+
+<script>
+var t = async_test("textAlign start with ltr is the left edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'start';
+    ctx.fillText('DD', 0, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.start.ltr
+// Description:textAlign start with ltr is the left edge
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign start with ltr is the left edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'start';
+    ctx.fillText('DD', 0, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.start.rtl</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.start.rtl</h1>
+<p class="desc">textAlign start with rtl is the right edge</p>
+
+
+<script>
+var t = async_test("textAlign start with rtl is the right edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'start';
+    ctx.fillText('DD', 100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.start.rtl
+// Description:textAlign start with rtl is the right edge
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign start with rtl is the right edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'start';
+    ctx.fillText('DD', 100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.alphabetic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.alphabetic</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'alphabetic';
+    ctx.fillText('CC', 0, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.alphabetic
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'alphabetic';
+    ctx.fillText('CC', 0, 37.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.bottom</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.bottom</h1>
+<p class="desc">textBaseline bottom is the bottom of the em square (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textBaseline bottom is the bottom of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'bottom';
+    ctx.fillText('CC', 0, 50);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.bottom
+// Description:textBaseline bottom is the bottom of the em square (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textBaseline bottom is the bottom of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'bottom';
+    ctx.fillText('CC', 0, 50);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.hanging</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.hanging</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'hanging';
+    ctx.fillText('CC', 0, 12.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.hanging
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'hanging';
+    ctx.fillText('CC', 0, 12.5);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.ideographic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.ideographic</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'ideographic';
+    ctx.fillText('CC', 0, 31.25);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.ideographic
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'ideographic';
+    ctx.fillText('CC', 0, 31.25);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.middle.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.middle</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.middle</h1>
+<p class="desc">textBaseline middle is the middle of the em square (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textBaseline middle is the middle of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'middle';
+    ctx.fillText('CC', 0, 25);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.middle.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.middle
+// Description:textBaseline middle is the middle of the em square (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textBaseline middle is the middle of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'middle';
+    ctx.fillText('CC', 0, 25);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.top.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.top</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.top</h1>
+<p class="desc">textBaseline top is the top of the em square (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textBaseline top is the top of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'top';
+    ctx.fillText('CC', 0, 0);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.baseline.top.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.top
+// Description:textBaseline top is the top of the em square (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textBaseline top is the top of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'top';
+    ctx.fillText('CC', 0, 0);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.basic</h1>
+<p class="desc">fillText draws filled text</p>
+
+
+<script>
+var t = async_test("fillText draws filled text");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('PASS', 5, 35);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.basic
+// Description:fillText draws filled text
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText draws filled text");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('PASS', 5, 35);
+
+t.done();
+
+});
+done();
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..70d7b046cb226cfcb2bfeebe3477d3b580d8270a
GIT binary patch
literal 1137
zc$@)o1djWOP)<h;3K|Lk000e1NJLTq003kF001%w0ssI2C0FU`00006VoOIv0RI60
z0RN!9r;`8x1SUyDK~!jg?U-9=R7V)cf4eot)C*QCRtZ)`Ew;ACTG6NvQd%V<4OCGS
z32hMzy_i0Dp-LzeydW6x%?tWauhl4u5Nqv?LIa^*NJ&d;THBCntw}?Sw-`;f59Ql_
zXZOt6Io-2cALhq-n9Tg=Ki_^ibLIjLhr{7;I2;bg!^r|j1U|Rm8k~n6Fdt&p&byV#
z;*e1dhUIV=zK2%mhO5v3d*D^*pGOl98IzUr)WKK_+al;tz0O+4^9Z~JZGkbg!MlO~
zwn$8T2%D?~w7{rLwo65P4-(L0m*O~lY#qi&5YL%O=4ACrYmLEUPz<j?y;7dYWP4ha
z)l%4K5zHzz#CNa)CO{zo{h<Wjhigi+I%g*S1Sd<=7d}_w$!6t9cmN4#f-%qw3AmEU
zzYwm7c?}d8WJBS+no0w5U}D5RS-^Pc5%Gs+*&5O81mIiwvpmrJMUi#Fpg`p~ncWFk
zkpq)ZQ`1Nj)JwU<EUS>hKeM$){!EL>!vrZ@gw8<a&u~V{&*#9z;<d5kGL!-^!XTIm
zlK{8@UjR@8TL377V))(A@qrYIEy6esarg@wa$sU4)HDS4iTE3XV7mzRsLJHxP-S+W
zr6O5s8GUX{jD$_rIT0W6Yb}85BABD<-;v7S%-@3;G>WVnw!yfNza=UYBcYP@jQYT@
z@)MLxYqK{gk3+XK%`^MYggf4S(2uYk%Ip`ch)n#kPnKS8yA0o~V<Om;)^t*>=mE@y
ztA4x3`%nj)V7A4!I}#Hgf|Jz`hC?ZA@D5+?XEjtU#!siUE>yE)cwk6FV6%7MnDR8k
zI@xFD)FhSvaNIcuMSfOqD?vJi&@O_t7J(JOORyCh3}O5P)AC~SFQJmv0|(7BKe^<+
zXAtZV!KIM1U<6dae)!WH&rNtXpC%cT)egTvEqnk^nSCazF7<HM?`c$;Io3Z?6NA}s
zM)`b}Pm{1)2NRn^&gBDHj1_}z%IdkinM9JTIJAUJ)?FB)9HzrwI0bv{M(nE=oYx{X
z2_lkYy(|v*yeUZMNwrg}RP~Fb@{akcAcf>D(E3PCfM^cVCXy%TPoX_f*$iJxS)Z#f
zNTCRp*bVxG6j~xR2_pM9YarYfhvgRfH`Iuws{W!>{%Ss@Cz&DFWC`z{E)o+X*(d9D
z_3{t2&<|3_5q;QRq9Xaho5vJN)D7P!-lj-QjAWmzucZ4?>n?|+%Pn<97gMLD1oT2J
ztb`I63BzC_EQ7=9tJjrw6%~nzkt~xnTD{4Otb3KILElvMk3y~WdfEjG{mdgV@h8h<
zRY~7Y!x_kzKJbThOgS6Hp%Pj%{m3r^cgT^L_>fJqV$dXg_l4|Rt;U^_)>;IMVHecF
zCFp=IXqG#J7wm?J#KhrnI2;a#!{Kl^91e%W@jvl5XF~slY@&Fz00000NkvXXu0mjf
Ddixa5
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.NaN</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.NaN</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, NaN);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.NaN
+// Description:fillText handles maxWidth correctly
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, NaN);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.bound</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.bound</h1>
+<p class="desc">fillText handles maxWidth based on line size, not bounding box size</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth based on line size, not bounding box size");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('DD', 0, 37.5, 100);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.js
@@ -0,0 +1,31 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.bound
+// Description:fillText handles maxWidth based on line size, not bounding box size
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth based on line size, not bounding box size");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('DD', 0, 37.5, 100);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.fontface</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.fontface</h1>
+<p class="desc">fillText works on @font-face fonts</p>
+
+
+<script>
+var t = async_test("fillText works on @font-face fonts");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#0f0';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#f00';
+    ctx.fillText('EEEE', -50, 37.5, 40);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.js
@@ -0,0 +1,31 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.fontface
+// Description:fillText works on @font-face fonts
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText works on @font-face fonts");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#0f0';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#f00';
+    ctx.fillText('EEEE', -50, 37.5, 40);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.large</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.large</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('PASS', 5, 35, 200);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js
@@ -0,0 +1,24 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.large
+// Description:fillText handles maxWidth correctly
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('PASS', 5, 35, 200);
+
+t.done();
+
+});
+done();
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..70d7b046cb226cfcb2bfeebe3477d3b580d8270a
GIT binary patch
literal 1137
zc$@)o1djWOP)<h;3K|Lk000e1NJLTq003kF001%w0ssI2C0FU`00006VoOIv0RI60
z0RN!9r;`8x1SUyDK~!jg?U-9=R7V)cf4eot)C*QCRtZ)`Ew;ACTG6NvQd%V<4OCGS
z32hMzy_i0Dp-LzeydW6x%?tWauhl4u5Nqv?LIa^*NJ&d;THBCntw}?Sw-`;f59Ql_
zXZOt6Io-2cALhq-n9Tg=Ki_^ibLIjLhr{7;I2;bg!^r|j1U|Rm8k~n6Fdt&p&byV#
z;*e1dhUIV=zK2%mhO5v3d*D^*pGOl98IzUr)WKK_+al;tz0O+4^9Z~JZGkbg!MlO~
zwn$8T2%D?~w7{rLwo65P4-(L0m*O~lY#qi&5YL%O=4ACrYmLEUPz<j?y;7dYWP4ha
z)l%4K5zHzz#CNa)CO{zo{h<Wjhigi+I%g*S1Sd<=7d}_w$!6t9cmN4#f-%qw3AmEU
zzYwm7c?}d8WJBS+no0w5U}D5RS-^Pc5%Gs+*&5O81mIiwvpmrJMUi#Fpg`p~ncWFk
zkpq)ZQ`1Nj)JwU<EUS>hKeM$){!EL>!vrZ@gw8<a&u~V{&*#9z;<d5kGL!-^!XTIm
zlK{8@UjR@8TL377V))(A@qrYIEy6esarg@wa$sU4)HDS4iTE3XV7mzRsLJHxP-S+W
zr6O5s8GUX{jD$_rIT0W6Yb}85BABD<-;v7S%-@3;G>WVnw!yfNza=UYBcYP@jQYT@
z@)MLxYqK{gk3+XK%`^MYggf4S(2uYk%Ip`ch)n#kPnKS8yA0o~V<Om;)^t*>=mE@y
ztA4x3`%nj)V7A4!I}#Hgf|Jz`hC?ZA@D5+?XEjtU#!siUE>yE)cwk6FV6%7MnDR8k
zI@xFD)FhSvaNIcuMSfOqD?vJi&@O_t7J(JOORyCh3}O5P)AC~SFQJmv0|(7BKe^<+
zXAtZV!KIM1U<6dae)!WH&rNtXpC%cT)egTvEqnk^nSCazF7<HM?`c$;Io3Z?6NA}s
zM)`b}Pm{1)2NRn^&gBDHj1_}z%IdkinM9JTIJAUJ)?FB)9HzrwI0bv{M(nE=oYx{X
z2_lkYy(|v*yeUZMNwrg}RP~Fb@{akcAcf>D(E3PCfM^cVCXy%TPoX_f*$iJxS)Z#f
zNTCRp*bVxG6j~xR2_pM9YarYfhvgRfH`Iuws{W!>{%Ss@Cz&DFWC`z{E)o+X*(d9D
z_3{t2&<|3_5q;QRq9Xaho5vJN)D7P!-lj-QjAWmzucZ4?>n?|+%Pn<97gMLD1oT2J
ztb`I63BzC_EQ7=9tJjrw6%~nzkt~xnTD{4Otb3KILElvMk3y~WdfEjG{mdgV@h8h<
zRY~7Y!x_kzKJbThOgS6Hp%Pj%{m3r^cgT^L_>fJqV$dXg_l4|Rt;U^_)>;IMVHecF
zCFp=IXqG#J7wm?J#KhrnI2;a#!{Kl^91e%W@jvl5XF~slY@&Fz00000NkvXXu0mjf
Ddixa5
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.negative</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.negative</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, -1);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.negative
+// Description:fillText handles maxWidth correctly
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, -1);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.small</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.small</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', -100, 35, 90);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.small
+// Description:fillText handles maxWidth correctly
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', -100, 35, 90);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.zero</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.zero</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, 0);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.zero
+// Description:fillText handles maxWidth correctly
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, 0);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.rtl</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.rtl</h1>
+<p class="desc">fillText respects Right-To-Left Override characters</p>
+
+
+<script>
+var t = async_test("fillText respects Right-To-Left Override characters");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.rtl
+// Description:fillText respects Right-To-Left Override characters
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText respects Right-To-Left Override characters");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35);
+
+t.done();
+
+});
+done();
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..70d7b046cb226cfcb2bfeebe3477d3b580d8270a
GIT binary patch
literal 1137
zc$@)o1djWOP)<h;3K|Lk000e1NJLTq003kF001%w0ssI2C0FU`00006VoOIv0RI60
z0RN!9r;`8x1SUyDK~!jg?U-9=R7V)cf4eot)C*QCRtZ)`Ew;ACTG6NvQd%V<4OCGS
z32hMzy_i0Dp-LzeydW6x%?tWauhl4u5Nqv?LIa^*NJ&d;THBCntw}?Sw-`;f59Ql_
zXZOt6Io-2cALhq-n9Tg=Ki_^ibLIjLhr{7;I2;bg!^r|j1U|Rm8k~n6Fdt&p&byV#
z;*e1dhUIV=zK2%mhO5v3d*D^*pGOl98IzUr)WKK_+al;tz0O+4^9Z~JZGkbg!MlO~
zwn$8T2%D?~w7{rLwo65P4-(L0m*O~lY#qi&5YL%O=4ACrYmLEUPz<j?y;7dYWP4ha
z)l%4K5zHzz#CNa)CO{zo{h<Wjhigi+I%g*S1Sd<=7d}_w$!6t9cmN4#f-%qw3AmEU
zzYwm7c?}d8WJBS+no0w5U}D5RS-^Pc5%Gs+*&5O81mIiwvpmrJMUi#Fpg`p~ncWFk
zkpq)ZQ`1Nj)JwU<EUS>hKeM$){!EL>!vrZ@gw8<a&u~V{&*#9z;<d5kGL!-^!XTIm
zlK{8@UjR@8TL377V))(A@qrYIEy6esarg@wa$sU4)HDS4iTE3XV7mzRsLJHxP-S+W
zr6O5s8GUX{jD$_rIT0W6Yb}85BABD<-;v7S%-@3;G>WVnw!yfNza=UYBcYP@jQYT@
z@)MLxYqK{gk3+XK%`^MYggf4S(2uYk%Ip`ch)n#kPnKS8yA0o~V<Om;)^t*>=mE@y
ztA4x3`%nj)V7A4!I}#Hgf|Jz`hC?ZA@D5+?XEjtU#!siUE>yE)cwk6FV6%7MnDR8k
zI@xFD)FhSvaNIcuMSfOqD?vJi&@O_t7J(JOORyCh3}O5P)AC~SFQJmv0|(7BKe^<+
zXAtZV!KIM1U<6dae)!WH&rNtXpC%cT)egTvEqnk^nSCazF7<HM?`c$;Io3Z?6NA}s
zM)`b}Pm{1)2NRn^&gBDHj1_}z%IdkinM9JTIJAUJ)?FB)9HzrwI0bv{M(nE=oYx{X
z2_lkYy(|v*yeUZMNwrg}RP~Fb@{akcAcf>D(E3PCfM^cVCXy%TPoX_f*$iJxS)Z#f
zNTCRp*bVxG6j~xR2_pM9YarYfhvgRfH`Iuws{W!>{%Ss@Cz&DFWC`z{E)o+X*(d9D
z_3{t2&<|3_5q;QRq9Xaho5vJN)D7P!-lj-QjAWmzucZ4?>n?|+%Pn<97gMLD1oT2J
ztb`I63BzC_EQ7=9tJjrw6%~nzkt~xnTD{4Otb3KILElvMk3y~WdfEjG{mdgV@h8h<
zRY~7Y!x_kzKJbThOgS6Hp%Pj%{m3r^cgT^L_>fJqV$dXg_l4|Rt;U^_)>;IMVHecF
zCFp=IXqG#J7wm?J#KhrnI2;a#!{Kl^91e%W@jvl5XF~slY@&Fz00000NkvXXu0mjf
Ddixa5
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.unaffected</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.unaffected</h1>
+<p class="desc">fillText does not start a new path or subpath</p>
+
+
+<script>
+var t = async_test("fillText does not start a new path or subpath");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('FAIL', 5, 35);
+
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.js
@@ -0,0 +1,35 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.unaffected
+// Description:fillText does not start a new path or subpath
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText does not start a new path or subpath");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('FAIL', 5, 35);
+
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fontface</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fontface</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '67px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('AA', 0, 50);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fontface.notinpage</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fontface.notinpage</h1>
+<p class="desc">@font-face fonts should work even if they are not used in the page</p>
+
+
+<script>
+var t = async_test("@font-face fonts should work even if they are not used in the page");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '67px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('AA', 0, 50);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.js
@@ -0,0 +1,31 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fontface.notinpage
+// Description:@font-face fonts should work even if they are not used in the page
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("@font-face fonts should work even if they are not used in the page");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '67px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('AA', 0, 50);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fontface.repeat</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fontface.repeat</h1>
+<p class="desc">Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)</p>
+
+
+<script>
+var t = async_test("Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.font = '67px CanvasTest';
+ctx.fillStyle = '#0f0';
+ctx.fillText('AA', 0, 50);
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillText('AA', 0, 50);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.js
@@ -0,0 +1,32 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fontface.repeat
+// Description:Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.font = '67px CanvasTest';
+ctx.fillStyle = '#0f0';
+ctx.fillText('AA', 0, 50);
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillText('AA', 0, 50);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.fontface.worker.js
@@ -0,0 +1,31 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fontface
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '67px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('AA', 0, 50);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.kern.consistent</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.kern.consistent</h1>
+<p class="desc">Stroked and filled text should have exactly the same kerning so it overlaps</p>
+
+
+<script>
+var t = async_test("Stroked and filled text should have exactly the same kerning so it overlaps");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 3;
+ctx.font = '20px Arial, sans-serif';
+ctx.fillText('VAVAVAVAVAVAVA', -50, 25);
+ctx.fillText('ToToToToToToTo', -50, 45);
+ctx.strokeText('VAVAVAVAVAVAVA', -50, 25);
+ctx.strokeText('ToToToToToToTo', -50, 45);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.kern.consistent
+// Description:Stroked and filled text should have exactly the same kerning so it overlaps
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Stroked and filled text should have exactly the same kerning so it overlaps");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 3;
+ctx.font = '20px Arial, sans-serif';
+ctx.fillText('VAVAVAVAVAVAVA', -50, 25);
+ctx.fillText('ToToToToToToTo', -50, 45);
+ctx.strokeText('VAVAVAVAVAVAVA', -50, 25);
+ctx.strokeText('ToToToToToToTo', -50, 45);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.basic.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.basic</h1>
+<p class="desc">U+0020 is rendered the correct size (1em wide)</p>
+
+
+<script>
+var t = async_test("U+0020 is rendered the correct size (1em wide)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('E EE', -100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.basic.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.basic
+// Description:U+0020 is rendered the correct size (1em wide)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("U+0020 is rendered the correct size (1em wide)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('E EE', -100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.collapse.end</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.collapse.end</h1>
+<p class="desc">Space characters at the end of a line are collapsed (per CSS)</p>
+
+
+<script>
+var t = async_test("Space characters at the end of a line are collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'right';
+    ctx.fillText('EE ', 100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.js
@@ -0,0 +1,30 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.end
+// Description:Space characters at the end of a line are collapsed (per CSS)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Space characters at the end of a line are collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'right';
+    ctx.fillText('EE ', 100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.collapse.nonspace</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.collapse.nonspace</h1>
+<p class="desc">Non-space characters are not converted to U+0020 and collapsed</p>
+
+
+<script>
+var t = async_test("Non-space characters are not converted to U+0020 and collapsed");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('E\x0b EE', -150, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.nonspace
+// Description:Non-space characters are not converted to U+0020 and collapsed
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Non-space characters are not converted to U+0020 and collapsed");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('E\x0b EE', -150, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.collapse.other</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.collapse.other</h1>
+<p class="desc">Space characters are converted to U+0020, and collapsed (per CSS)</p>
+
+
+<script>
+var t = async_test("Space characters are converted to U+0020, and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('E \x09\x0a\x0c\x0d  \x09\x0a\x0c\x0dEE', -100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.other
+// Description:Space characters are converted to U+0020, and collapsed (per CSS)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Space characters are converted to U+0020, and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('E \x09\x0a\x0c\x0d  \x09\x0a\x0c\x0dEE', -100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.collapse.space</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.collapse.space</h1>
+<p class="desc">Space characters are converted to U+0020, and collapsed (per CSS)</p>
+
+
+<script>
+var t = async_test("Space characters are converted to U+0020, and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('E  EE', -100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.space
+// Description:Space characters are converted to U+0020, and collapsed (per CSS)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Space characters are converted to U+0020, and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('E  EE', -100, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.collapse.start</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.collapse.start</h1>
+<p class="desc">Space characters at the start of a line are collapsed (per CSS)</p>
+
+
+<script>
+var t = async_test("Space characters at the start of a line are collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText(' EE', 0, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.start
+// Description:Space characters at the start of a line are collapsed (per CSS)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Space characters at the start of a line are collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText(' EE', 0, 37.5);
+    _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.stroke.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.stroke.basic</h1>
+<p class="desc">strokeText draws stroked text</p>
+
+
+<script>
+var t = async_test("strokeText draws stroked text");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.fillStyle = '#f00';
+ctx.lineWidth = 1;
+ctx.font = '35px Arial, sans-serif';
+ctx.strokeText('PASS', 5, 35);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js
@@ -0,0 +1,26 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.stroke.basic
+// Description:strokeText draws stroked text
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("strokeText draws stroked text");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.fillStyle = '#f00';
+ctx.lineWidth = 1;
+ctx.font = '35px Arial, sans-serif';
+ctx.strokeText('PASS', 5, 35);
+
+t.done();
+
+});
+done();
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..fb3b5b830d345d2aa858e41673e08f99977baf08
GIT binary patch
literal 1634
zc$@)Z2A%ndP)<h;3K|Lk000e1NJLTq003kF001%w0ssI2C0FU`00006VoOIv0RI60
z0RN!9r;`8x1{X<0K~!jg?b&;bRn-;8@y`Htc$IN@4I&Q%*ixk0778L&aiUnBDkg{&
zgwz6|MGYw!sMr{7tqN%>#Uc!kXbHp+sbDQ}N@)WO1$oGbVgL&RRTxG(KufT(1pCKi
z(+l^WJNGj8_OJ8J`D5R`*Z%Ew);{O#wf7|^CMG5(CMG5(9~7jno<N8Cx}M_*dpMfS
zfK#|Sl;5R1o4$4QrWYkN=M*Q{%c1{=NJOx9@B!6nySAh&{ix=7R`ErBF7{w6%P8VJ
zL%E&{_4TTwnAwcxJi9o-If^Oa+nnKb=JRR(MJ{IteKWIc#2~iw28Hz*Kg};`#vHJV
zyD}T)0gkhPucm4(pbrbE=Ds|NL_b+m*~u;38ZmYaAF>TJVFl+I7wu~Shq#v(EaWDp
zGKdGFyVNm;=eUPT(4Cv<L<`Pxkj<O~eOSwMR_8^eQ9X{9GLqt?t2MW=lnOd?o(c5l
z&S<IIIYT8kb0ghZ$z8Nd>p&6n8A&DAQO*`dP|Sa5$3*tCm{#m!7%$O24<eCVd=2OD
zOte`6GkKrp;6Z*LZM=->;5AP3W3W6FqL{^U(3T_2pmCB-E0(a8tH6AImIskYG7MH7
zzheq$$thZ;vS~prB{Zg*>1+YF@L}Y~05)+uc%ENHn-#DwOhz}3<v}Eptb#QxAp_XS
zw^G@R3lH6`?4}uKC;{(Be-?2(m~Esqts4V)FO*LtBq+HOssEdm2?w|?l&iTWmCZxE
z0!Hx$pRt~Mz!D}!i=U?n_&Z(Fy0Me%*-jO0_)4xtBFXB>>cPQKemhk*(20{Yr7_2X
z2lw$O(1zN}=kR}QWGE=5iXLe_xr6?6<I8yvi6pCF-OC?Bc^|!#3}&$q+#OO46!IyZ
z!Ahn@h)-mFC_l_eRx>`lRvD5Lkw`KRRsnzH`=Er{R13{M27ur4qlEh3FdLMzCqloF
z-8>$Cw&Gz{Q_F7VF)U(9$+<`*83wC}g;ek*@B~YfZ2GYuVXbVN&@_O3pn!w)ix}k^
z_OqPggvuri<ViO0Pd4$xOU3gclA6R|Rq$NW^)ltuQWoaqTB_-pB(;Diz<AbP+El=S
zFwiU(NBh&97x@Qe+!0ctixe`971S^z%v>Hsu5`O|nxkx|7PRF}*71uZ4?d<ZM<}N(
zX%F#J+VB`1*hd%6M%*geGm%mBWD{>wp0Ku{8!uAA(6D#OlgK4xzL9RuWU6>NRpdv7
zC9fl&F`PRuy(Uo;rg2T$93qj{jAjW(ImFA1NXUZb^5?XP?v;vM(UaAjBCh5JdQr|i
zDpKjJWeu+|oX4X5o<Su;c#8h@-Q;ETWH4hWVm!NP#17^ptbjQZsV`V_7{caDThDQZ
z(;VPk{vF{#JNDQ2W+l>?Lt(pHM<MO#KnYtoleYW)yu^3-h_Q@ic<w|H65F(F<jMN2
zQZSY`Im@+ak8bKHqn2g-fJZ{*VZPuKx-gk_X%$|l2Q!&M1<&SG1i9JnMDY->f{6@E
zb<T6~8pRl}j0b5J6l(b{{a8w$3`YD5H-h5{yRMvwq$8^gJ|(?566WGP2BtN>o4<zg
zTZ|9ol_A~z21k<?`(*A9*-1A(%BcwQ_+(9B1sAx1BDSVA-ayx|XDmxt6W4`v)IC(N
zIIX`;d7M>XAbWEvl8y#GS&jK59Cbg#+zh(R3j;ObSV(RQsS3++Q`WPML8<PxFPnLl
zMifw)aAunmk#saLSVIzCs{@&RDQ@C$Se&0_UZ@|z;qbp)0pDW}Cs@lOe$8wAjl)b1
z+tQgy%XdyhB57c-RxuUy;XuZ{D!C1G=S0HCWfuGSdV*zFMlzXcjNxmcz6n2}D%GJ?
zPDE1EkYE*Yiq>FmHr;1X7RnnKozOIn8W!@+h`!Aj#U9=Y$3Dq4SR^_r-Nwh1@=lg{
z)+A=L2t3MQKFF+NNA~gp7)VnFC$zTV5ysJyN@_UC=d`CI{dk8(tVugW!$cy2HH}W8
zyfMo^*~cZE|NV=fXVdplI)?HEp5pT)o6hv29c{Ua8migOscZ(yiAYRLOiWBnOiWBn
gOiWBnOiXV0FH)Ne)6~-9jQ{`u07*qoM6N<$f`u6Y-v9sr
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.stroke.unaffected</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.stroke.unaffected</h1>
+<p class="desc">strokeText does not start a new path or subpath</p>
+
+
+<script>
+var t = async_test("strokeText does not start a new path or subpath");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+
+ctx.font = '35px Arial, sans-serif';
+ctx.strokeStyle = '#f00';
+ctx.strokeText('FAIL', 5, 35);
+
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.js
@@ -0,0 +1,36 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.stroke.unaffected
+// Description:strokeText does not start a new path or subpath
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("strokeText does not start a new path or subpath");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+
+ctx.font = '35px Arial, sans-serif';
+ctx.strokeStyle = '#f00';
+ctx.strokeText('FAIL', 5, 35);
+
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.default.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.default</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.default</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.default.worker.js
@@ -0,0 +1,20 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.default
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.basic.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.parse.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.parse.basic</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '20px serif';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20PX   SERIF';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.basic.worker.js
@@ -0,0 +1,24 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.parse.basic
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '20px serif';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20PX   SERIF';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.complex.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.parse.complex</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.parse.complex</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif';
+_assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.complex.worker.js
@@ -0,0 +1,21 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.parse.complex
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif';
+_assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.invalid.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.parse.invalid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.parse.invalid</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '20px serif';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = 'bogus';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = 'inherit';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px {bogus}';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px initial';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px default';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px inherit';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '1em serif; background: green; margin: 10px';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.invalid.worker.js
@@ -0,0 +1,49 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.parse.invalid
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '20px serif';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = 'bogus';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = 'inherit';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px {bogus}';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px initial';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px default';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px inherit';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '1em serif; background: green; margin: 10px';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.system.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.parse.system</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.parse.system</h1>
+<p class="desc">System fonts must be computed to explicit values</p>
+
+
+<script>
+var t = async_test("System fonts must be computed to explicit values");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = 'message-box';
+_assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.system.worker.js
@@ -0,0 +1,21 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.parse.system
+// Description:System fonts must be computed to explicit values
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("System fonts must be computed to explicit values");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = 'message-box';
+_assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.tiny.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.parse.tiny</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.parse.tiny</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '1px sans-serif';
+_assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'");
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.font.parse.tiny.worker.js
@@ -0,0 +1,21 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.parse.tiny
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '1px sans-serif';
+_assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'");
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.basic.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.measure.width.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.measure.width.basic</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.font = '50px CanvasTest';
+    _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50");
+    _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100");
+    _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200");
+
+    ctx.font = '100px CanvasTest';
+    _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100");
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.basic.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.measure.width.basic
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.font = '50px CanvasTest';
+    _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50");
+    _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100");
+    _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200");
+
+    ctx.font = '100px CanvasTest';
+    _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100");
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.empty.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.measure.width.empty</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.measure.width.empty</h1>
+<p class="desc">The empty string has zero width</p>
+
+
+<script>
+var t = async_test("The empty string has zero width");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.font = '50px CanvasTest';
+    _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0");
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.empty.worker.js
@@ -0,0 +1,24 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.measure.width.empty
+// Description:The empty string has zero width
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("The empty string has zero width");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.font = '50px CanvasTest';
+    _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0");
+}), 500);
+
+t.done();
+
+});
+done();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.space.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.measure.width.space</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.measure.width.space</h1>
+<p class="desc">Space characters are converted to U+0020 and collapsed (per CSS)</p>
+
+
+<script>
+var t = async_test("Space characters are converted to U+0020 and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.font = '50px CanvasTest';
+    _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
+    _assertSame(ctx.measureText('A  B').width, 150, "ctx.measureText('A  B').width", "150");
+    _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d  \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d  \\x09\\x0a\\x0c\\x0dB').width", "150");
+    _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200");
+
+    _assertSame(ctx.measureText(' AB').width, 100, "ctx.measureText(' AB').width", "100");
+    _assertSame(ctx.measureText('AB ').width, 100, "ctx.measureText('AB ').width", "100");
+}), 500);
+
+t.done();
+
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/offscreen-canvas/text/2d.text.measure.width.space.worker.js
@@ -0,0 +1,30 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.measure.width.space
+// Description:Space characters are converted to U+0020 and collapsed (per CSS)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Space characters are converted to U+0020 and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+    ctx.font = '50px CanvasTest';
+    _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
+    _assertSame(ctx.measureText('A  B').width, 150, "ctx.measureText('A  B').width", "150");
+    _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d  \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d  \\x09\\x0a\\x0c\\x0dB').width", "150");
+    _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200");
+
+    _assertSame(ctx.measureText(' AB').width, 100, "ctx.measureText(' AB').width", "100");
+    _assertSame(ctx.measureText('AB ').width, 100, "ctx.measureText('AB ').width", "100");
+}), 500);
+
+t.done();
+
+});
+done();
--- a/testing/web-platform/tests/offscreen-canvas/tools/name2dir.yaml
+++ b/testing/web-platform/tests/offscreen-canvas/tools/name2dir.yaml
@@ -8,16 +8,17 @@ 2d.strokeStyle:                       "f
 2d.shadow:                            "shadows"
 2d.clearRect:                         "drawing-rectangles-to-the-canvas"
 2d.fillRect:                          "drawing-rectangles-to-the-canvas"
 2d.strokeRect:                        "drawing-rectangles-to-the-canvas"
 2d.drawImage:                         "drawing-images-to-the-canvas"
 2d.imageData:                         "pixel-manipulation"
 2d.line:                              "line-styles"
 2d.path:                              "path-objects"
+2d.text:                              "text"
 2d.coordinatespace:                   "conformance-requirements"
 2d.missingargs:                       "conformance-requirements"
 2d.voidreturn:                        "conformance-requirements"
 2d.canvas:                            "the-offscreen-canvas"
 2d.getcontext:                        "the-offscreen-canvas"
 context:                              "the-offscreen-canvas"
 initial:                              "the-offscreen-canvas"
 size:                                 "the-offscreen-canvas"
--- a/testing/web-platform/tests/offscreen-canvas/tools/templates.yaml
+++ b/testing/web-platform/tests/offscreen-canvas/tools/templates.yaml
@@ -39,9 +39,8 @@ w3cworker: |
     var offscreenCanvas = new OffscreenCanvas(100, 50);
     var ctx = offscreenCanvas.getContext('2d');
 
     %(code)s
     t.done();
 
     });
     done();
-
--- a/testing/web-platform/tests/offscreen-canvas/tools/tests2d.yaml
+++ b/testing/web-platform/tests/offscreen-canvas/tools/tests2d.yaml
@@ -9211,8 +9211,995 @@
     - size.height
   notes: Not sure how reasonable this is, but the spec doesn't say there's an upper limit on the size.
   code: |
     var n = 2147483647; // 2^31 - 1, which should be supported by any sensible definition of "long"
     offscreenCanvas.width = n;
     offscreenCanvas.height = n;
     @assert offscreenCanvas.width === n;
     @assert offscreenCanvas.height === n;
+
+- name: 2d.text.font.parse.basic
+  testing:
+    - 2d.text.font.parse
+    - 2d.text.font.get
+  code: |
+    ctx.font = '20px serif';
+    @assert ctx.font === '20px serif';
+
+    ctx.font = '20PX   SERIF';
+    @assert ctx.font === '20px serif'; @moz-todo
+
+- name: 2d.text.font.parse.tiny
+  testing:
+    - 2d.text.font.parse
+    - 2d.text.font.get
+  code: |
+    ctx.font = '1px sans-serif';
+    @assert ctx.font === '1px sans-serif';
+
+- name: 2d.text.font.parse.complex
+  testing:
+    - 2d.text.font.parse
+    - 2d.text.font.get
+    - 2d.text.font.lineheight
+  code: |
+    ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif';
+    @assert ctx.font === 'italic small-caps 12px "Unknown Font", sans-serif'; @moz-todo
+
+  # TODO:
+  #   2d.text.font.parse.size.absolute
+  #     xx-small x-small small medium large x-large xx-large
+  #   2d.text.font.parse.size.relative
+  #     smaller larger
+  #   2d.text.font.parse.size.length.relative
+  #     em ex px
+  #   2d.text.font.parse.size.length.absolute
+  #     in cm mm pt pc
+
+- name: 2d.text.font.parse.system
+  desc: System fonts must be computed to explicit values
+  testing:
+    - 2d.text.font.parse
+    - 2d.text.font.get
+    - 2d.text.font.systemfonts
+  code: |
+    ctx.font = 'message-box';
+    @assert ctx.font !== 'message-box';
+
+- name: 2d.text.font.parse.invalid
+  testing:
+    - 2d.text.font.invalid
+  code: |
+    ctx.font = '20px serif';
+    @assert ctx.font === '20px serif';
+
+    ctx.font = '20px serif';
+    ctx.font = 'bogus';
+    @assert ctx.font === '20px serif';
+
+    ctx.font = '20px serif';
+    ctx.font = 'inherit';
+    @assert ctx.font === '20px serif';
+
+    ctx.font = '20px serif';
+    ctx.font = '10px {bogus}';
+    @assert ctx.font === '20px serif';
+
+    ctx.font = '20px serif';
+    ctx.font = '10px initial';
+    @assert ctx.font === '20px serif'; @moz-todo
+
+    ctx.font = '20px serif';
+    ctx.font = '10px default';
+    @assert ctx.font === '20px serif'; @moz-todo
+
+    ctx.font = '20px serif';
+    ctx.font = '10px inherit';
+    @assert ctx.font === '20px serif';
+
+    ctx.font = '20px serif';
+    ctx.font = '1em serif; background: green; margin: 10px';
+    @assert ctx.font === '20px serif';
+
+- name: 2d.text.font.default
+  testing:
+    - 2d.text.font.default
+  code: |
+    @assert ctx.font === '10px sans-serif';
+
+
+
+- name: 2d.text.align.valid
+  testing:
+    - 2d.text.align.get
+    - 2d.text.align.set
+  code: |
+    ctx.textAlign = 'start';
+    @assert ctx.textAlign === 'start';
+
+    ctx.textAlign = 'end';
+    @assert ctx.textAlign === 'end';
+
+    ctx.textAlign = 'left';
+    @assert ctx.textAlign === 'left';
+
+    ctx.textAlign = 'right';
+    @assert ctx.textAlign === 'right';
+
+    ctx.textAlign = 'center';
+    @assert ctx.textAlign === 'center';
+
+- name: 2d.text.align.invalid
+  testing:
+    - 2d.text.align.invalid
+  code: |
+    ctx.textAlign = 'start';
+    ctx.textAlign = 'bogus';
+    @assert ctx.textAlign === 'start';
+
+    ctx.textAlign = 'start';
+    ctx.textAlign = 'END';
+    @assert ctx.textAlign === 'start';
+
+    ctx.textAlign = 'start';
+    ctx.textAlign = 'end ';
+    @assert ctx.textAlign === 'start';
+
+    ctx.textAlign = 'start';
+    ctx.textAlign = 'end\0';
+    @assert ctx.textAlign === 'start';
+
+- name: 2d.text.align.default
+  testing:
+    - 2d.text.align.default
+  code: |
+    @assert ctx.textAlign === 'start';
+
+
+- name: 2d.text.baseline.valid
+  testing:
+    - 2d.text.baseline.get
+    - 2d.text.baseline.set
+  code: |
+    ctx.textBaseline = 'top';
+    @assert ctx.textBaseline === 'top';
+
+    ctx.textBaseline = 'hanging';
+    @assert ctx.textBaseline === 'hanging';
+
+    ctx.textBaseline = 'middle';
+    @assert ctx.textBaseline === 'middle';
+
+    ctx.textBaseline = 'alphabetic';
+    @assert ctx.textBaseline === 'alphabetic';
+
+    ctx.textBaseline = 'ideographic';
+    @assert ctx.textBaseline === 'ideographic';
+
+    ctx.textBaseline = 'bottom';
+    @assert ctx.textBaseline === 'bottom';
+
+- name: 2d.text.baseline.invalid
+  testing:
+    - 2d.text.baseline.invalid
+  code: |
+    ctx.textBaseline = 'top';
+    ctx.textBaseline = 'bogus';
+    @assert ctx.textBaseline === 'top';
+
+    ctx.textBaseline = 'top';
+    ctx.textBaseline = 'MIDDLE';
+    @assert ctx.textBaseline === 'top';
+
+    ctx.textBaseline = 'top';
+    ctx.textBaseline = 'middle ';
+    @assert ctx.textBaseline === 'top';
+
+    ctx.textBaseline = 'top';
+    ctx.textBaseline = 'middle\0';
+    @assert ctx.textBaseline === 'top';
+
+- name: 2d.text.baseline.default
+  testing:
+    - 2d.text.baseline.default
+  code: |
+    @assert ctx.textBaseline === 'alphabetic';
+
+- name: 2d.text.draw.fill.basic
+  desc: fillText draws filled text
+  manual:
+  testing:
+    - 2d.text.draw
+    - 2d.text.draw.fill
+  code: |
+    ctx.fillStyle = '#000';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.strokeStyle = '#f00';
+    ctx.font = '35px Arial, sans-serif';
+    ctx.fillText('PASS', 5, 35);
+  expected: &passfill |
+    size 100 50
+    cr.set_source_rgb(0, 0, 0)
+    cr.rectangle(0, 0, 100, 50)
+    cr.fill()
+    cr.set_source_rgb(0, 1, 0)
+    cr.select_font_face("Arial")
+    cr.set_font_size(35)
+    cr.translate(5, 35)
+    cr.text_path("PASS")
+    cr.fill()
+
+- name: 2d.text.draw.fill.unaffected
+  desc: fillText does not start a new path or subpath
+  testing:
+    - 2d.text.draw.fill
+  code: |
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+
+    ctx.moveTo(0, 0);
+    ctx.lineTo(100, 0);
+
+    ctx.font = '35px Arial, sans-serif';
+    ctx.fillText('FAIL', 5, 35);
+
+    ctx.lineTo(100, 50);
+    ctx.lineTo(0, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fill();
+
+    @assert pixel 50,25 == 0,255,0,255;
+    @assert pixel 5,45 == 0,255,0,255;
+  expected: green
+
+- name: 2d.text.draw.fill.rtl
+  desc: fillText respects Right-To-Left Override characters
+  manual:
+  testing:
+    - 2d.text.draw
+  code: |
+    ctx.fillStyle = '#000';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.strokeStyle = '#f00';
+    ctx.font = '35px Arial, sans-serif';
+    ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35);
+  expected: *passfill
+
+- name: 2d.text.draw.fill.maxWidth.large
+  desc: fillText handles maxWidth correctly
+  manual:
+  testing:
+    - 2d.text.draw.maxwidth
+  code: |
+    ctx.fillStyle = '#000';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.font = '35px Arial, sans-serif';
+    ctx.fillText('PASS', 5, 35, 200);
+  expected: *passfill
+
+- name: 2d.text.draw.fill.maxWidth.small
+  desc: fillText handles maxWidth correctly
+  testing:
+    - 2d.text.draw.maxwidth
+  code: |
+    ctx.fillStyle = '#0f0';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#f00';
+    ctx.font = '35px Arial, sans-serif';
+    ctx.fillText('fail fail fail fail fail', -100, 35, 90);
+    _assertGreen(ctx, 100, 50);
+  expected: green
+
+- name: 2d.text.draw.fill.maxWidth.zero
+  desc: fillText handles maxWidth correctly
+  testing:
+    - 2d.text.draw.maxwidth
+  code: |
+    ctx.fillStyle = '#0f0';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#f00';
+    ctx.font = '35px Arial, sans-serif';
+    ctx.fillText('fail fail fail fail fail', 5, 35, 0);
+    _assertGreen(ctx, 100, 50);
+  expected: green
+
+- name: 2d.text.draw.fill.maxWidth.negative
+  desc: fillText handles maxWidth correctly
+  testing:
+    - 2d.text.draw.maxwidth
+  code: |
+    ctx.fillStyle = '#0f0';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#f00';
+    ctx.font = '35px Arial, sans-serif';
+    ctx.fillText('fail fail fail fail fail', 5, 35, -1);
+    _assertGreen(ctx, 100, 50);
+  expected: green
+
+- name: 2d.text.draw.fill.maxWidth.NaN
+  desc: fillText handles maxWidth correctly
+  testing:
+    - 2d.text.draw.maxwidth
+  code: |
+    ctx.fillStyle = '#0f0';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#f00';
+    ctx.font = '35px Arial, sans-serif';
+    ctx.fillText('fail fail fail fail fail', 5, 35, NaN);
+    _assertGreen(ctx, 100, 50);
+  expected: green
+
+- name: 2d.text.draw.stroke.basic
+  desc: strokeText draws stroked text
+  manual:
+  testing:
+    - 2d.text.draw
+    - 2d.text.draw.stroke
+  code: |
+    ctx.fillStyle = '#000';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.strokeStyle = '#0f0';
+    ctx.fillStyle = '#f00';
+    ctx.lineWidth = 1;
+    ctx.font = '35px Arial, sans-serif';
+    ctx.strokeText('PASS', 5, 35);
+  expected: |
+    size 100 50
+    cr.set_source_rgb(0, 0, 0)
+    cr.rectangle(0, 0, 100, 50)
+    cr.fill()
+    cr.set_source_rgb(0, 1, 0)
+    cr.select_font_face("Arial")
+    cr.set_font_size(35)
+    cr.set_line_width(1)
+    cr.translate(5, 35)
+    cr.text_path("PASS")
+    cr.stroke()
+
+- name: 2d.text.draw.stroke.unaffected
+  desc: strokeText does not start a new path or subpath
+  testing:
+    - 2d.text.draw.stroke
+  code: |
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+
+    ctx.moveTo(0, 0);
+    ctx.lineTo(100, 0);
+
+    ctx.font = '35px Arial, sans-serif';
+    ctx.strokeStyle = '#f00';
+    ctx.strokeText('FAIL', 5, 35);
+
+    ctx.lineTo(100, 50);
+    ctx.lineTo(0, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fill();
+
+    @assert pixel 50,25 == 0,255,0,255;
+    @assert pixel 5,45 == 0,255,0,255;
+  expected: green
+
+- name: 2d.text.draw.kern.consistent
+  desc: Stroked and filled text should have exactly the same kerning so it overlaps
+  manual:
+  testing:
+    - 2d.text.draw
+  code: |
+    ctx.fillStyle = '#0f0';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#f00';
+    ctx.strokeStyle = '#0f0';
+    ctx.lineWidth = 3;
+    ctx.font = '20px Arial, sans-serif';
+    ctx.fillText('VAVAVAVAVAVAVA', -50, 25);
+    ctx.fillText('ToToToToToToTo', -50, 45);
+    ctx.strokeText('VAVAVAVAVAVAVA', -50, 25);
+    ctx.strokeText('ToToToToToToTo', -50, 45);
+  expected: green
+
+# CanvasTest is:
+#   A = (0, 0) to (1em, 0.75em)       (above baseline)
+#   B = (0, 0) to (1em, -0.25em)      (below baseline)
+#   C = (0, -0.25em) to (1em, 0.75em) (the em square) plus some Xs above and below
+#   D = (0, -0.25em) to (1em, 0.75em) (the em square) plus some Xs left and right
+#   E = (0, -0.25em) to (1em, 0.75em) (the em square)
+#   space = empty, 1em wide
+#
+# At 50px, "E" will fill the canvas vertically
+# At 67px, "A" will fill the canvas vertically
+#
+# Ideographic baseline  is 0.125em above alphabetic
+# Mathematical baseline is 0.375em above alphabetic
+# Hanging baseline      is 0.500em above alphabetic
+
+- name: 2d.text.draw.fill.maxWidth.fontface
+  desc: fillText works on @font-face fonts
+  testing:
+    - 2d.text.draw.maxwidth
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#0f0';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#f00';
+        ctx.fillText('EEEE', -50, 37.5, 40);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.fill.maxWidth.bound
+  desc: fillText handles maxWidth based on line size, not bounding box size
+  testing:
+    - 2d.text.draw.maxwidth
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.fillText('DD', 0, 37.5, 100);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.fontface
+  testing:
+    - 2d.text.font.fontface
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '67px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.fillText('AA', 0, 50);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.fontface.repeat
+  desc: Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)
+  testing:
+    - 2d.text.font.fontface
+  fonts:
+    - CanvasTest
+  fonthack: 0
+  code: |
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.font = '67px CanvasTest';
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('AA', 0, 50);
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillText('AA', 0, 50);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.fontface.notinpage
+  desc: "@font-face fonts should work even if they are not used in the page"
+  testing:
+    - 2d.text.font.fontface
+  fonts:
+    - CanvasTest
+  fonthack: 0
+  code: |
+    ctx.font = '67px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.fillText('AA', 0, 50);
+        @assert pixel 5,5 ==~ 0,255,0,255; @moz-todo
+        @assert pixel 95,5 ==~ 0,255,0,255; @moz-todo
+        @assert pixel 25,25 ==~ 0,255,0,255; @moz-todo
+        @assert pixel 75,25 ==~ 0,255,0,255; @moz-todo
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.baseline.top
+  desc: textBaseline top is the top of the em square (not the bounding box)
+  testing:
+    - 2d.text.baseline.top
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textBaseline = 'top';
+        ctx.fillText('CC', 0, 0);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.baseline.bottom
+  desc: textBaseline bottom is the bottom of the em square (not the bounding box)
+  testing:
+    - 2d.text.baseline.bottom
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textBaseline = 'bottom';
+        ctx.fillText('CC', 0, 50);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.baseline.middle
+  desc: textBaseline middle is the middle of the em square (not the bounding box)
+  testing:
+    - 2d.text.baseline.middle
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textBaseline = 'middle';
+        ctx.fillText('CC', 0, 25);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.baseline.alphabetic
+  testing:
+    - 2d.text.baseline.alphabetic
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textBaseline = 'alphabetic';
+        ctx.fillText('CC', 0, 37.5);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.baseline.ideographic
+  testing:
+    - 2d.text.baseline.ideographic
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textBaseline = 'ideographic';
+        ctx.fillText('CC', 0, 31.25);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255; @moz-todo
+        @assert pixel 95,45 ==~ 0,255,0,255; @moz-todo
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.baseline.hanging
+  testing:
+    - 2d.text.baseline.hanging
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textBaseline = 'hanging';
+        ctx.fillText('CC', 0, 12.5);
+        @assert pixel 5,5 ==~ 0,255,0,255; @moz-todo
+        @assert pixel 95,5 ==~ 0,255,0,255; @moz-todo
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.align.left
+  desc: textAlign left is the left of the first em square (not the bounding box)
+  testing:
+    - 2d.text.align.left
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textAlign = 'left';
+        ctx.fillText('DD', 0, 37.5);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.align.right
+  desc: textAlign right is the right of the last em square (not the bounding box)
+  testing:
+    - 2d.text.align.right
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textAlign = 'right';
+        ctx.fillText('DD', 100, 37.5);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.align.start.ltr
+  desc: textAlign start with ltr is the left edge
+  testing:
+    - 2d.text.align.left
+  fonts:
+    - CanvasTest
+  canvas: width="100" height="50" dir="ltr"
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textAlign = 'start';
+        ctx.fillText('DD', 0, 37.5);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.align.start.rtl
+  desc: textAlign start with rtl is the right edge
+  testing:
+    - 2d.text.align.right
+    - 2d.text.draw.direction
+  fonts:
+    - CanvasTest
+  canvas: width="100" height="50" dir="rtl"
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textAlign = 'start';
+        ctx.fillText('DD', 100, 37.5);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.align.end.ltr
+  desc: textAlign end with ltr is the right edge
+  testing:
+    - 2d.text.align.right
+  fonts:
+    - CanvasTest
+  canvas: width="100" height="50" dir="ltr"
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textAlign = 'end';
+        ctx.fillText('DD', 100, 37.5);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.align.end.rtl
+  desc: textAlign end with rtl is the left edge
+  testing:
+    - 2d.text.align.left
+    - 2d.text.draw.direction
+  fonts:
+    - CanvasTest
+  canvas: width="100" height="50" dir="rtl"
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textAlign = 'end';
+        ctx.fillText('DD', 0, 37.5);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.align.center
+  desc: textAlign center is the center of the em squares (not the bounding box)
+  testing:
+    - 2d.text.align.center
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textAlign = 'center';
+        ctx.fillText('DD', 50, 37.5);
+        @assert pixel 5,5 ==~ 0,255,0,255;
+        @assert pixel 95,5 ==~ 0,255,0,255;
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+        @assert pixel 5,45 ==~ 0,255,0,255;
+        @assert pixel 95,45 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+
+- name: 2d.text.draw.space.basic
+  desc: U+0020 is rendered the correct size (1em wide)
+  testing:
+    - 2d.text.draw.spaces
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.fillText('E EE', -100, 37.5);
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.space.collapse.space
+  desc: Space characters are converted to U+0020, and collapsed (per CSS)
+  testing:
+    - 2d.text.draw.spaces
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.fillText('E  EE', -100, 37.5);
+        @assert pixel 25,25 ==~ 0,255,0,255; @moz-todo
+        @assert pixel 75,25 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.space.collapse.other
+  desc: Space characters are converted to U+0020, and collapsed (per CSS)
+  testing:
+    - 2d.text.draw.spaces
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.fillText('E \x09\x0a\x0c\x0d  \x09\x0a\x0c\x0dEE', -100, 37.5);
+        @assert pixel 25,25 ==~ 0,255,0,255; @moz-todo
+        @assert pixel 75,25 ==~ 0,255,0,255; @moz-todo
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.space.collapse.nonspace
+  desc: Non-space characters are not converted to U+0020 and collapsed
+  testing:
+    - 2d.text.draw.spaces
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.fillText('E\x0b EE', -150, 37.5);
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.space.collapse.start
+  desc: Space characters at the start of a line are collapsed (per CSS)
+  testing:
+    - 2d.text.draw.spaces
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.fillText(' EE', 0, 37.5);
+        @assert pixel 25,25 ==~ 0,255,0,255; @moz-todo
+        @assert pixel 75,25 ==~ 0,255,0,255;
+    }), 500);
+  expected: green
+
+- name: 2d.text.draw.space.collapse.end
+  desc: Space characters at the end of a line are collapsed (per CSS)
+  testing:
+    - 2d.text.draw.spaces
+  fonts:
+    - CanvasTest
+  code: |
+    ctx.font = '50px CanvasTest';
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.fillStyle = '#f00';
+        ctx.fillRect(0, 0, 100, 50);
+        ctx.fillStyle = '#0f0';
+        ctx.textAlign = 'right';
+        ctx.fillText('EE ', 100, 37.5);
+        @assert pixel 25,25 ==~ 0,255,0,255;
+        @assert pixel 75,25 ==~ 0,255,0,255; @moz-todo
+    }), 500);
+  expected: green
+
+- name: 2d.text.measure.width.basic
+  testing:
+    - 2d.text.measure
+  fonts:
+    - CanvasTest
+  code: |
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.font = '50px CanvasTest';
+        @assert ctx.measureText('A').width === 50;
+        @assert ctx.measureText('AA').width === 100;
+        @assert ctx.measureText('ABCD').width === 200;
+
+        ctx.font = '100px CanvasTest';
+        @assert ctx.measureText('A').width === 100;
+    }), 500);
+
+- name: 2d.text.measure.width.empty
+  desc: The empty string has zero width
+  testing:
+    - 2d.text.measure
+  fonts:
+    - CanvasTest
+  code: |
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.font = '50px CanvasTest';
+        @assert ctx.measureText("").width === 0;
+    }), 500);
+
+- name: 2d.text.measure.width.space
+  desc: Space characters are converted to U+0020 and collapsed (per CSS)
+  testing:
+    - 2d.text.measure.spaces
+  fonts:
+    - CanvasTest
+  code: |
+    deferTest();
+    step_timeout(t.step_func_done(function () {
+        ctx.font = '50px CanvasTest';
+        @assert ctx.measureText('A B').width === 150;
+        @assert ctx.measureText('A  B').width === 150; @moz-todo
+        @assert ctx.measureText('A \x09\x0a\x0c\x0d  \x09\x0a\x0c\x0dB').width === 150; @moz-todo
+        @assert ctx.measureText('A \x0b B').width >= 200;
+
+        @assert ctx.measureText(' AB').width === 100; @moz-todo
+        @assert ctx.measureText('AB ').width === 100; @moz-todo
+    }), 500);
+
+# TODO: shadows, alpha, composite, clip